May 16, 2008, 12:51 PM
Tom FMonth Translate in Date Needed as dd-jan-yyyy
Here is an example...
HIRE_DATE DATE6 DATE5
1966/09/12 SEP 12-09-1966
Logic:
DATE5/D-M-YY = HIRE_DATE ;
DATE6/MT = HIRE_DATE ;
Tried DATE5/D-Mtr-YY = HIRE_DATE ; fails
Want
12-SEP-1966
Thanks
May 16, 2008, 02:11 PM
Alan BTry using DATETRAN with the -T output option.
May 17, 2008, 12:40 AM
FrankDutchTom
You should buy the book "almost 1001 Ways to Work with Dates in WebFOCUS"
It will help you in many date format and calculation questions.
May 18, 2008, 04:07 AM
Danny-SRLTom,
Alan has good advice. Here is the code:
DATE5/DMYY=HIRE_DATE;
DATE6/A11 = DATETRAN (DATE5, '(DMYY)', '(-T)', 'EN', 11, 'A11')
Just notice that the date DATE6 is an ALPHA field, so you will not be able to sort on it nor test except for equality.
May 18, 2008, 05:15 AM
FrankDutchDanny is right, but you still have your HIRE_DATE if you want the correct sorting.
May 21, 2008, 12:54 PM
Tom FThanks for your help. That worked fine. I have the 1001 date book but couldn't find this solution.