calculate days until today
calculate days until today
(OP)
Hello,
i'm a newbie with webfocus. The second report, I shall write, has to calculate with date. I have a field that contains a beginning date with timestamp. The format is A19. It looks like 2004-07-27-07.25.15.416780. I have to count the days from beginning date until "today". I don't know, how much reports I started without getting the right solution! Can you help me, please?
Thanks
Karin
i'm a newbie with webfocus. The second report, I shall write, has to calculate with date. I have a field that contains a beginning date with timestamp. The format is A19. It looks like 2004-07-27-07.25.15.416780. I have to count the days from beginning date until "today". I don't know, how much reports I started without getting the right solution! Can you help me, please?
Thanks
Karin
RE: calculate days until today
If you're dealing with 'smart' dates, you can just subtract two dates to get the difference.
As an aside, the string you gave was 26 characters long; it won't fit into an A19.
CODE
-* the next line is just to get the value into a field
XDT/A26='2004-07-27-07.25.15.416780';
ADT/A8YYMD=EDIT(XDT,'9999$99$99');
DATEDIFF/I6 = YMD(ADT,'&YYMD');
END
TABLE FILE CAR
PRINT XDT ADT DATEDIFF
WHERE COUNTRY EQ 'ENGLAND'
END
RE: calculate days until today
great! It works!
Thanks
Karin