Convert timestamp to format ISO 8061

Database

Convert timestamp to format ISO 8061

Hi

Is there a way to convert TIMESTAMP data to ISO 8061 format, so the result will be something like: ' 2011-04-04T12:57:18.530'?
Tags (3)
1 REPLY
Senior Apprentice

Re: Convert timestamp to format ISO 8061

There's no FORMAT for 'T', so you have to do some concat:

((ts (format 'yyyy-mm-dd')) (varchar(10))) || 'T' || ((ts (format 'hh:mi:ss.s(3)')) (varchar(12)))

Dieter