Date format conversion



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Date format conversion

Postby gauravfrankly » Tue Aug 25, 2015 12:50 pm

Hi All,
I have a FB file having multiple columns, date is one of them in format : 12-AUG-2015
I have to insert this date into Db2, so I want to change its format.
Can you suggest way to do it by Sort.(only format conversion) to mm/dd/yyyy or yyyy-mm-dd
gauravfrankly
 
Posts: 39
Joined: Fri Aug 07, 2015 3:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Date format conversion

Postby NicC » Tue Aug 25, 2015 3:55 pm

If it is a file - real term, 'dataset' - then each record has fields not columns. Columns in a record are the individual bytes. DB2 tables have rows that consist of one or more columns.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Date format conversion

Postby BillyBoyo » Tue Aug 25, 2015 4:16 pm

Use CHANGE= to convert the month, and rearrange into the order you want with BUILD (or OVERLAY if at a different position in the record).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post