sql - Using toChar to convert W3C XML Schema xs:dateTime type format to dd-mm-yy hh:mm:ss -


i'm trying convert xml schema xs:datetime formatted date more readable format using to_char.

i've tried:

select to_char('2013-08-16t09:55:02+02:00', 'dd-mm-yyyy hh:mm:ss')    dual; 

but fails.

any clues on how this?

convert string literal time stamp time zone data type using to_timestamp_tz() , apply to_char() function:

select to_char(to_timestamp_tz( '2013-08-16t09:55:02+02:00'                               , 'yyyy-mm-dd"t"hh:mi:ssx tzh:tzm'                                )                , 'dd-mm-yyyy hh:mi:ss') res                    dual 

result:

res: ----------------- 16-08-2013 09:55:02 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -