Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Date issue in webfocus 532
Go
New
Search
Notify
Tools
Reply
  
Date issue in webfocus 532
 Login/Join
 
<kj>
posted
Has any one experienced with this isssue?

-SET &DT1= '20041201';
-SET &DTYYMD=DATECVT(&DT1 ,'I8YYMD','YYMD');
-SET &DATEMDYY=DATECVT(&DT1 ,'I8YYMD','YYMD');

The variable &DTYYMD displays 37956, where as &DATEMDYY displays current date in yymd format.
This is happening after upgrading to webfocus 532 on win2k. Both the variables displays 37956 in 521 & 526.
Any Idea why is it happening?

Thanks,
kj
 
Reply With QuoteReport This Post
<RJones>
posted
Try removing the 'I8' on the input format for the &DTYYMD field:

-SET &DTYYMD=DATECVT(&DT1 ,'YYMD','YYMD');

On the second one &DATE is a reserved word and by adding MDYY or YYMD to it, it changes the format, so the DATECVT is being ignored. You can see this by trying:
-TYPE &DATE
-TYPE &DATEMDYY
 
Reply With QuoteReport This Post
Expert
posted Hide Post
KJ, since your're using the datecvt function, i'm assuming that you in fact WANT a smart date as a result.
And that number 37956 is exactly correct, its the smartdate being held in variable &DTYYMD.
Smartdates are integers representing the number of dates elapsed since the beginning of the last century ; theres a difference between the way FOcus calculates it and Excel calculates it, but you can get the idea by going to Excel and entering 12/1/04 in a date formated cell a1,
and then in another cell enter =value(a1) and you'll see 38322. This is how both applications handle date arithmetic.
So if you WANT a smart date in an &var, you've got it.
If you DON"T want a smart date in an &var, then don't use the DATECVT function.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Date issue in webfocus 532

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.