Date convertion
Moderators: chulett, rschirm, roy
Date convertion
Can anyone please through some light on converting DD/MM/YYYY format to YYYY-MM-DD format in PX?
Re: Date convertion
You can use below format:subrat wrote:Can anyone please through some light on converting DD/MM/YYYY format to YYYY-MM-DD format in PX?
StringToDate(DATE_COL,"%dd-%mmm-%1980yy")
where 1980 is cut-off year. hence it will convert 03-MAY-99 to 1999-05-03 and 05-NOV-05 to 2005-11-05.
Hope this helps.
Thanks
Brajesh.
Braj
The 1980 part is unneeded with a 4 digit year as is "mmm" with a 2 digit month. Are both of your examples strings? Or is one an actual Date? That changes the answer, but the StringToDate() and DateToString() functions are what you need to become familiar with.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers