Focal Point
Alpha to numeric date conversion?

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4681087331

July 07, 2004, 08:19 PM
<MikeR>
Alpha to numeric date conversion?
I have a frontend program that is passing a date as alpha MM/DD/CCYY to a WebFOCUS program. I need to convert that to a numeric CCYYMMDD format to use in a WHERE statement. I tried:

AND ( SERVICEDT GE
(DATECVT(&SRVDTLO, 'M/D/YY', 'YYMD'))
)

but don't get the correct results. Do I need to specify numeric somehow? Is there a way to use -TYPE or some other command to see what it's converting to?

Any suggestions would be appreciated.

Mike R
July 07, 2004, 08:57 PM
jimster06
Here's one way:
-SET &IN_DATE = EDIT(&DATEMDYY,'$$$$$$9999') | EDIT(&DATE,'99$99');
-TYPE &IN_DATE
Not real slick but it works. It does assume that month and day are ALWAYS two digits.
July 08, 2004, 01:14 PM
<MikeR>
That does it. Thank you very much.