Hi All
How can i do date comparison in the server job in the transformer.
TIA
Akash
How to do Date Comparison in server job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 27
- Joined: Fri Aug 13, 2004 3:36 am
- Location: INDIA
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
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.
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.
-
- Participant
- Posts: 108
- Joined: Mon Oct 21, 2002 8:30 am