Hi,
Please help how to get 30 days old date from current date .
Thanks and Regards,
how to get 30 days old date from current date
Moderators: chulett, rschirm, roy
Look into the DateFromDaysSince() function, or if you are on 8.5+ there's DateOffsetByComponents() as well. Always a good idea to check the documentation first when you have a question like this. While there you'll also find functions like CurrentDate() or CurrentTimestamp() depending on what you need.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
As suggested by Craig,
for Datastage 8.5+
For Earlier versions of Datastage
for Datastage 8.5+
Code: Select all
DateOffsetByComponents(CurrentDate(),0,0,-30)
Code: Select all
DateFromDaysSince(-30, CurrentDate())
Thanx and Regards,
ETL User
ETL User