Page 1 of 1

How to do Date Comparison in server job

Posted: Mon Feb 07, 2005 2:01 am
by akash_nitj
Hi All
How can i do date comparison in the server job in the transformer.
TIA
Akash

Posted: Mon Feb 07, 2005 3:41 am
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.

Posted: Mon Feb 07, 2005 10:58 am
by Baldmartyr
Any reason why this should not be moved to the DS Server forum?

Posted: Mon Feb 07, 2005 6:46 pm
by T42
Nope.