Posted: Fri Jun 05, 2015 6:09 am Post subject: unable to convert to TIMESTAMP
Partisan
Joined: 25 Jul 2006 Posts: 369
Hi All,
I am getting date in input xml field as "2015-06-04 14:53:56". I wanted to convert it to "2015-06-04T14:53:56".
I tries to use cast, but didnt work out.
CAST('2015-06-04 14:53:56' AS TIMESTAMP FORMAT "yyyy-DD-mmTHH:mm:SS)
Posted: Fri Jun 05, 2015 6:28 am Post subject: Re: unable to convert to TIMESTAMP
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
chris boehnke wrote:
Hi All,
I am getting date in input xml field as "2015-06-04 14:53:56". I wanted to convert it to "2015-06-04T14:53:56".
I tries to use cast, but didnt work out.
CAST('2015-06-04 14:53:56' AS TIMESTAMP FORMAT "yyyy-DD-mmTHH:mm:SS)
Could you pls let me know how to get this format
Here you are trying to cast a character as timestamp. The format would in this case describe the input and does not match.
Try doing the opposite:
from a timestamp variable cast as character format ...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum