Hi,
I am trying to convert a character date, format:
MM/DD/YY
to a date, format:
DD/MM/YYYY
In Server Edition, this was easily taken care of using oconv, but now tht we are moving onto EE, I am having difficulty. I tried the following:
DateToString(StringToDate(Trim(lkDatesStripped.DataOut), "%mm/%dd/%yy"), "%dd/%mm/%yyyy")
This however took input 02/11/07 and converted to 11/02/1907!
Any suggestions please.
Thanks
Data conversion
Moderators: chulett, rschirm, roy
Try this.
or
Set APT_DATE_CENTURY_BREAK_YEAR environment variable to 2000.
Code: Select all
DateToString(StringToDate(Trim(lkDatesStripped.DataOut), "%mm/%dd/%yy"), "%dd/%mm/%2000yy")
Set APT_DATE_CENTURY_BREAK_YEAR environment variable to 2000.
What happens if you specify as below:Narayana wrote:But I do get the Data of '97 so if i am derivation as provided.. it iwill again give me the wrong output even if i set the Env variable to 2000.
Thanks for your reply
Code: Select all
DateToString(StringToDate(Trim(lkDatesStripped.DataOut), "%mm/%dd/%yy"), "%dd/%mm/%1950yy")