> This one is challenging me.  I want to take this formatted DATETIME
> value, '03-Oct-2007 01:23:38 PM', a string from EXCEL, and convert it to
> some RBase DATETIME value or separate DATE and TIME values.  I know that
> I can do RDATE||RTIME(INT_1,INT_2,INT_3), but that 3-CHAR abbreviation
> for MONTH has me stymied.

SET VAR vstr = '03-Oct-2007'
SET VAR armon = 'JanFebMarAprMayJunJulAugSepOctNovDec'


SET VAR vret DATE = +
(RDATE((INT( (((SLOC(.armon, (SGET(.vstr,3,4))))  + 2) / 3))), +
(INT((SGET(.vstr,2,1)))), (INT((SGET(.vstr,4,8))))))

SET VAR vmsg = (CTXT(.vret))
PAUSE 2 USING .vmsg

RETURN


Reply via email to