Author |
Message
|
broker_new |
Posted: Fri Sep 19, 2008 9:22 pm Post subject: Cast TIMESTAMP |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
DECLARE iDate TIMESTAMP CAST(InputRoot.XMLNS.In.DATE1 AS TIMESTAMP FORMAT 'MM/dd/yyyy hh:mm:ss');
Iam casting the input message into TIMESTAMP
<In><DATE1>09/15/2008 21:09:09<DATE1></In>.
Iam getting the following error.
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 1
(0x03000000):Number = 3204
(0x03000000):Text = 'Hour value out of range (1-12)'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '09/15/2008 21:09:09'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'mm/dd/yyyy hh:mm:ss'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '21'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
Any thoughts in this to cast in a proper format |
|
Back to top |
|
 |
broker_new |
Posted: Fri Sep 19, 2008 9:28 pm Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
I changed the syntax as...
DECLARE iDate TIMESTAMP CAST(InputRoot.XMLNS.In.DATE1 AS TIMESTAMP FORMAT 'MM/dd/yyyy HH:mm:ss');
Iam casting the input message into TIMESTAMP
<In><DATE1>09/15/2008 21:09:09<DATE1></In>.
Replaced hh to HH it worked well but this time for each test the hour is incremented by 1....
iDate Value becomes 09/15/2008 22:09:09
Am i doing anything wrong here |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Sep 20, 2008 5:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Check your message set and the checkbox for DST (daylight savings time).
You might need to check it.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
broker_new |
Posted: Sat Sep 20, 2008 6:04 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Sorry the message domain is XMLNS(not MRM)..
I shall try using message set and check atleast it will work out  |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Sep 20, 2008 6:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
broker_new wrote: |
Sorry the message domain is XMLNS(not MRM)..
I shall try using message set and check atleast it will work out  |
Just try and do everything with GMTTIMESTAMP. This should not get affected, if the time is read correctly from the OS? _________________ MQ & Broker admin |
|
Back to top |
|
 |
broker_new |
Posted: Sat Sep 20, 2008 2:34 pm Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Strange....
I have created a Message Set and declared the data types as dateTime...
It worked well and the values are mapped without any issues...
This is absolutely,unacceptable,inconsistent behaviour of Broker(6.0.0.3)....
I think there is a problem in CAST AS TIMESTAMP behaviour...probably It is considering daylight savings....
<In><DATE1>09/15/2008 21:09:09<DATE1></In>.
DECLARE iDate TIMESTAMP InputRoot.MRM.DATE1;
SET OutputRoot.XMLNSC.Out.Date1 = iDate;
<Out><Date1>09/15/2008 21:09:09</Date1></Out> |
|
Back to top |
|
 |
mgk |
Posted: Sun Sep 21, 2008 11:48 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
This sounds odd to me, I think you should raise a PMR to get to the bottom of it. _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
broker_new |
Posted: Tue Oct 14, 2008 10:14 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Raising a PMR is like  |
|
Back to top |
|
 |
|