Hi All
i have to subtract/add one/or more days from current date in transformer stage.
wht is the function or proper syntax to do this in datastage PX.
Thanks
Amit
Date Arithmetic inDatastage
Moderators: chulett, rschirm, roy
You can use CurrentDate() function.
To add n days to current date, use CurrentDate() + n
To subtract n days from current date, use CurrentDate() - n
This fuction is even listed in Functions> Date & Time in derivation field in Transformer.
To add n days to current date, use CurrentDate() + n
To subtract n days from current date, use CurrentDate() - n
This fuction is even listed in Functions> Date & Time in derivation field in Transformer.
Nitin Jain | India
If everything seems to be going well, you have obviously overlooked something.
If everything seems to be going well, you have obviously overlooked something.
In the sameline, with a date in yyyy-mm-dd available, how can I get the day part of Julian Day [yyyyddd]. Any direction in this is appreciated. Thankzkoolnitz wrote:You can use CurrentDate() function.
To add n days to current date, use CurrentDate() + n
To subtract n days from current date, use CurrentDate() - n
This fuction is even listed in Functions> Date & Time in derivation field in Transformer.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
i try to use the above method , but it gives compile errorkoolnitz wrote:You can use CurrentDate() function.
To add n days to current date, use CurrentDate() + n
To subtract n days from current date, use CurrentDate() - n
This fuction is even listed in Functions> Date & Time in derivation field in Transformer.
Error in output column derivation expression for column DWH_Entry_Date in link J_000_MLI_BILL_I_lk4. Invalid conversion requested from a dfloat to a date.
Kindly advice
Mohmmed Elgendy
Senior System Analyst
Data IntegrationTeam
Etisalat Egypt
+20 1118511161
Senior System Analyst
Data IntegrationTeam
Etisalat Egypt
+20 1118511161
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: