Focal Point
Another Date

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

October 10, 2005, 08:58 PM
Prarie
Another Date
I have a file I've inherited with the following date format.
TB_Year/D20.2
TB_Period/D20.2

Having a problem getting these to the right formats.
TB_Year/YYYY
TB_Period/MM/DD/YYYY

I just won't even share the strange results I'm coming up with. Eeker
October 10, 2005, 10:22 PM
John Price
Try this:

New_year/I4YY = TB_Year ;
New_Period/I6MDYY = TB_Period ;

This presumes that the data is in the D20.2 field as YYYY and MMDDYYYY.

If you want to get these into "smart dates" add:

Sd_year/YY = New_Year ;
Sd_Period/MDYY = New_Period ;

Note: a D20 field implies a 128bit number (16 bytes). Focus may have problems with a number this large but it generally allows this for "packed" fields. You may need to convert the field to packed format first. (Integer is a 32bit or 4 byte field, double precision up to D16 is 64bit or 8 byte field, Packed fields are 64bit up to length P16 and 128bit above that). In any event the idea is to get the field down in size and to type integer then apply date format options to it.
Good luck
October 11, 2005, 12:50 PM
Prarie
Thanks! That Worked. I guess I tried everything...but that..and it was so simple.