Hi,
I want to convert the string to date(DD-MMM-YY) format. The string is in the following format : 01032008 12:00
I am using StringToDate(DSLink6.EFF,"DD-MMM-YY") but its showing the error
APT_ParseError: Parsing parameters "DD-MMM-YY" for conversion "date=date_from_ustring[%yyyy-%mm-%dd](ustring)": APT_Conversion_String_Date: Invalid Format [DD-MMM-YY] used for string_from_date type conversion.
How to convert sting to date(DD-MMM-YY)
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 15
- Joined: Tue Aug 26, 2008 5:07 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Perhaps you should ask Gordon Sumner.
Using StringToDate() you must provide the format of the string - that is, the format in which the string is being provided.
In your case you also need to remove the date component from your longer string that also includes the time.
So you need something like:(assuming that your string is in month-day-year order - adapt as required).
Using StringToDate() you must provide the format of the string - that is, the format in which the string is being provided.
In your case you also need to remove the date component from your longer string that also includes the time.
So you need something like:
Code: Select all
StringToDate(Left(InLink.TheString,8),"%mm%dd%yyyy")
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.