Date format (last day of previous month)
Moderators: chulett, rschirm, roy
Date format (last day of previous month)
Iam using DataStage 7.5 PX version, I have date coming as 2007-03-02, i need to convert to 2007-02-28 i.e., last day of the previous month, whenever i run the job, can we do it in a single line i.,e i.,e Transformer.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Or, slightly simpler:
Code: Select all
DateFromDaysSince(-1, StringToDate(DateToString(DSLink2.col1, "%yyyy-%mm") : '-01', "%yyyy-%mm-%dd"))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Date format (last day of previous month)
Its working, thank you