Hello
I have a requirement where i am getting a string like 01-JAN-2009 from file. I have to use some logic in such a way that i need to extract JAN and convert that to 01. if get 01-FEB-2009 then i need to get 02 and so on. Is there a function to get that value.
Thanks
Converting String to Month
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
(Index("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC", InLink.TheString[4,3], 1) - 1) / 3 + 1
Code: Select all
Right("00" : svMonthNumber, 2)
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.