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 » type cast problem

Post new topic  Reply to topic
 type cast problem « View previous topic :: View next topic » 
Author Message
ravi_sri24
PostPosted: Thu May 24, 2007 1:54 am    Post subject: type cast problem Reply with quote

Voyager

Joined: 11 May 2006
Posts: 83

My Message flow receving the message from the jms client program

this client program is sending the date value in the below format( this format is TIMESTAMP(6) ) sending this value to the flow as a String

String PutDateTime= "09-May-07 11.44.09.423000 AM";


Once i received this value in the MB am trying to type cast from STRING to TIMESTAMP to insert into DB by using below command

SET Environment.Variables.DateTimeSent =
CAST(InputRoot.MQRFH2.usr.PutDateTime AS TIMESTAMP);



but am getting the below error :

: Error casting the value ''09
-May-07 11.44.09.423000 AM'' to 'TIMESTAMP'. : GKOP_QH1_BK16.78aebebc-1201-0000-
0080-9f17d60b7f37: /build/S600_P/src/DataFlowEngine/ImbRdl/ImbRdlTypeCast.cpp: 3
39: SqlTypeCast::evaluate: :
May 24 09:51:24 stvsauxmu01 WebSphere Broker v6002[10719]: [ID 702911 user.error
] (GKOP_QH1_BK16.SSA_JMS)[84]BIP2461E: Error casting character string '09-May-07
11.44.09.423000 AM' to a TIMESTAMP. State = '-1' 'S22007' '0' '' : GKOP_QH1_BK1
6.78aebebc-1201-0000-0080-9f17d60b7f37: /build/S600_P/src/CommonServices/ImbDate
Time.cpp: 2797: ImbTimeStamp::fromString: :



Please some one can help me out on this
Back to top
View user's profile Send private message
mymq
PostPosted: Thu May 24, 2007 6:02 am    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

Have you checked your DB timestamp format.....and it is matching with the FORMAT.

What Db are u using?
_________________
--SRK--
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu May 24, 2007 2:09 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Use the FORMAT addition to your CAST clause.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ravi_sri24
PostPosted: Thu May 24, 2007 11:55 pm    Post subject: Reply with quote

Voyager

Joined: 11 May 2006
Posts: 83

fjb_saper wrote:
Use the FORMAT addition to your CAST clause.



Input Value is : 09-May-07 11.44.09.423000 PM in the form of string

Am casting it to GMTTIMESTAMP to insert into the DB

CAST(InputRoot.MQRFH2.usr.PutDateTime AS GMTTIMESTAMP FORMAT 'dd-MMM-yy HH.mm.ss.SSSSSS a');

but am getting the problem with the AM,PM

here the input value is having the PM, but the value inserted in the DB having the AM

i.e.,09-MAY-07 11.44.09.423000 AM

please any one can suggest me what is the problem
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 25, 2007 11:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Does your timezone have a 12 hour difference to UTC ?
_________________
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 » type cast problem
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.