Author |
Message
|
ravi_sri24 |
Posted: Thu May 24, 2007 1:54 am Post subject: type cast problem |
|
|
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 |
|
 |
mymq |
Posted: Thu May 24, 2007 6:02 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu May 24, 2007 2:09 pm Post subject: |
|
|
 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 |
|
 |
ravi_sri24 |
Posted: Thu May 24, 2007 11:55 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Fri May 25, 2007 11:05 am Post subject: |
|
|
 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 |
|
 |
|