Focal Point
Date Frustration

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

August 04, 2005, 10:08 PM
Prarie
Date Frustration
At this point...I've just looked at this entire report too long, But I just want &BACK to print 07/05/2005. No matter what I do...I can't seem to get this to happen.


-SET &THISDATE = &YYMD ;
-SET &TD30 = AYMD (&THISDATE, -30, 'I8YYMD');
-SET &BACK = DATECVT(&TD30,'I8YYMD','A8MDYY' );

-TYPE &THISDATE &TD30 &BACK

20050804 20050705 07052005

I know this can't be as hard as I'm making it...can someone help?
August 04, 2005, 10:27 PM
Francis Mariani
The quickest answer:

-SET &THISDATE = &YYMD ;
-SET &TD30 = AYMD (&THISDATE, -30, 'I8YYMD');
-SET &BACK1 = DATECVT(&TD30,'I8YYMD','A8MDYY' );
-SET &BACK = EDIT(&BACK1,'99/99/9999');

-TYPE &THISDATE &TD30 &BACK
August 04, 2005, 10:36 PM
Francis Mariani
or:

-SET &THISDATE = &YYMD ;
-SET &TD30 = AYMD (&THISDATE, -30, 'I8YYMD');
-SET &BACK = EDIT(DATECVT(&TD30,'I8YYMD','A8MDYY' ),'99/99/9999');

-TYPE &THISDATE &TD30 &BACK
August 05, 2005, 01:03 PM
Prarie
Thank-you so much...I don't know why my brain just could not get there yesterday.