Posts

Showing posts with the label canonical format

How to convert Char into Date format

If you have the date format in the canonical format, then using the functions over them , will give the expected output.. otherwise it wont't sample for this in here Problem stated :convert char format into date format using xdofx:to_char(substr('2008/02/28 00:00:00',1,10),'DD-MON-YYYY') but the conversion is not happening. if the data in the xml for the date field is good For ex: format-date:’2007-07-01T00:00:00.000-06:00’;’DD-MON-YYYY’ you get 01-Jul-2007 as output. Date should be proper format with timestamp. in this format YYYY-MM-DDThh:mm:ss+HH:MM. Even, If you dont want to change the xml data, still you can manipulate things xdofx:to_date(replace(substr('2008/02/28 00:00:00',1,10),’/’,’-’)||’T00:00:00.000-06:00’,'DD-MON-YYYY') Hope this helped Madhuri to get what she was expecting :).