Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Query and date processing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Query and date processing

    Need help in coding a query to get difference between 2 dates (Julian format yyddd). Both dates are stored as character. Thanks Larry Swain larry.swain@robins.af.mil

  • #2
    Query and date processing

    Many thanks to Mike for his assistance. larry swain Well, Assuming that the dates are all >2000 you could do the following; JDATE1 '20' || FIELD1 JDATE2 '20' || FIELD2 DYS DAYS(DATE(JDATE2)) - DAYS(DATE(JDATE1)) The first two change the julian dates to 4 digit year so that they're compatible with the query DATE function. Next the DAYS functions are used to convert the actual dates into a number of DAYS value. Then simply subracting one from the other gives the difference. Hope this helps regards Mike Faust

    Comment

    Working...
    X