How to do Date Comparison in server job

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
akash_nitj
Participant
Posts: 27
Joined: Fri Aug 13, 2004 3:36 am
Location: INDIA

How to do Date Comparison in server job

Post by akash_nitj »

Hi All
How can i do date comparison in the server job in the transformer.
TIA
Akash
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You first need to identify the incoming date's format to do this. Assuming that it is a DataStage's internal format, you can do it directly as DateField1 > DateField2 (or whichever comparison operator you need). If otherwise, you need to convert to DataStage's internal format using IConv function with the appropriate format.

For e.g. if it is YYYY-MM-DD, you can do a IConv(YourDate, 'D-YMD[4,2,2]') to convert it to internal format.

By-the-way, datastage's internal format is a running serial number (like a julian date) starting from 31st dec 1967.
Baldmartyr
Participant
Posts: 108
Joined: Mon Oct 21, 2002 8:30 am

Post by Baldmartyr »

Any reason why this should not be moved to the DS Server forum?
David Baldwin
Former DSXchange Webmaster
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Nope.
Post Reply