ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » unable to convert to TIMESTAMP

Post new topic  Reply to topic
 unable to convert to TIMESTAMP « View previous topic :: View next topic » 
Author Message
chris boehnke
PostPosted: Fri Jun 05, 2015 6:09 am    Post subject: unable to convert to TIMESTAMP Reply with quote

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)

Could you pls let me know how to get this format
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jun 05, 2015 6:21 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

FORMAT is used to describe the input, not the result.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 05, 2015 6:28 am    Post subject: Re: unable to convert to TIMESTAMP Reply with quote

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 ...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » unable to convert to TIMESTAMP
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.