Convert String to Date in Informix DB

user2760011 picture user2760011 · Jan 14, 2014 · Viewed 31.2k times · Source

I need to Convert a string say '12/12/2013 14:30:56.583' to be converted in Date Format like 2013-12-12 14:30:56.583 in Informix database.

I Used following function

to_date('12/12/2013 14:30:56.583',"%d/%m/%Y %H:%M:%S.")    

But its not accepting Milliseconds , Milliseconds are important to the resulting value.

Answer

Fernando Nunes picture Fernando Nunes · Jan 15, 2014

The database version is important. The behaviour of %F was recently (11.70.xC8 and 12.10.xC2) changed. In previous versions the "." dot must probably be omitted as well as the "n" qualifier. Regards