Hi all. I'm using release R727703B and I'm trying to convert an Academic Year in an A7 format i.e. "2004-05" to a YYMD for calculating date differences.
My thought was to do this: EDIT(EDIT( A_PERIOD,'9999') | '/09/01')) which creates 2004/09/01 in an A10 Format and then edits it into YYMD. Unfortunately the software doesn't like this and spits out blanks.
I then thought to do
EDIT(EDIT( F_PERIOD,'9999') | '0901') and put it into an I8YYMD format, but again, the software doesn't like this and only wants to spit out A8 format.
Any suggestions?This message has been edited. Last edited by: <Kathryn Henning>,
Good suggestion, I unfortunately get blanks in my S_DATE transform.
WebFocus 8.104 Windows 7 Entreprise, SP1
June 18, 2015, 02:49 PM
This works for me:
DEFINE FILE CAR
A_PERIOD/A7 WITH COUNTRY = '2004-05';
A_DATE/A8YYMD = EDIT(A_PERIOD,'9999$99') | '01';
S_DATE/YYMD = A_DATE ;
TABLE FILE CAR
PRINT A_PERIOD A_DATE S_DATE
WHERE RECORDLIMIT EQ 1 ;
June 18, 2015, 08:50 PM
Dan's suggestion should work unless there is something else there.