Focal Point
[RESOLVED] More fun with Dates

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

December 10, 2010, 09:13 AM
Ted Michalski
[RESOLVED] More fun with Dates
I can get the date format Oct-2010 if I use the following code:

COMPUTE DT1/DMY = HDATE(DB_DATE_FIELD, 'DMYY');
COMPUTE DT2/MYY = DT1 ;
COMPUTE DT3/A10 = DATETRAN(DT2,'(MYY)','(-dt)','EN',10,'A10');

But I need October-2010.

If I change the code to

COMPUTE DT3/A13 = DATETRAN(DT2,'(MTrYY)','(-dt)','EN',13,'A13');

I get blanks for DT3. Any ideas why?

This message has been edited. Last edited by: Ted Michalski,


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
December 10, 2010, 10:02 AM
Dan Satchell
Try this instead. Output formatting is being done by the third parameter, not the second.

COMPUTE DT3/A10 = DATETRAN(DT2,'(MYY)','(-dtr)','EN',15,'A15');



WebFOCUS 7.7.05
December 10, 2010, 10:10 AM
Ted Michalski
THANKS! That works.


7.7.02
Windows
EXCEL, PDF, CSV, TEXT