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 » problemConvertingFrom date to dateTime-Mapping node-v8.0.0.2

Post new topic  Reply to topic
 problemConvertingFrom date to dateTime-Mapping node-v8.0.0.2 « View previous topic :: View next topic » 
Author Message
vetric2k
PostPosted: Sat May 25, 2013 1:30 pm    Post subject: problemConvertingFrom date to dateTime-Mapping node-v8.0.0.2 Reply with quote

Newbie

Joined: 22 May 2013
Posts: 4

Dear All,

Facing problem while doing this simple conversion from date from dateTime inside mapping node.

Works great when using plain ESQL but problem exists when using ESQL inside mapping node. Only Timezone portion from dateTime field alone getting truncated.

Incoming Parameter type - xsd:date ('yyyyMMdd')
Return Value expected - xsd:dateTime ('yyyy-MM-dd''T''HH:mm:ssZZZ')
Return value actual - 'yyyy-MM-dd''T''HH:mm:ss'

e.g.,
Incoming Parameter type - 20130525
Return value expected - 2013-05-25T17:10:12-05:00
Return value actual - 2013-05-25T17:10:12

Note: Using a custom ESQL inside for-each. So unable to use date and functions provided by MB for this conversion.

Tried with Custom Java, Custom XPath in place of ESQL but no luck.

Using MB version: 8.0.0.2

Any help would be greatly appreciated.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun May 26, 2013 5:18 am    Post subject: Re: problemConvertingFrom date to dateTime-Mapping node-v8.0 Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

vetric2k wrote:
Note: Using a custom ESQL inside for-each. So unable to use date and functions provided by MB for this conversion.


Why not? If

vetric2k wrote:
Works great when using plain ESQL


what's the issue within the mapping node? Just that the return value is misformed? Where are you seeing these parameters? Debugger, user trace, downstream node?

Why not just use plain ESQL?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
vetric2k
PostPosted: Sun May 26, 2013 10:26 am    Post subject: Reply with quote

Newbie

Joined: 22 May 2013
Posts: 4

Hi Vitor, thanks for the response.

Quote:

Why not? If


If I use the default functions broker throws with an error saying this function can't be used inside for-each.
I need to iterate through an xml to get the date value.

Quote:

what's the issue within the mapping node? Just that the return value is misformed? Where are you seeing these parameters? Debugger, user trace, downstream node?


Yes on the return value the timezone portion (-05:00) alone getting stripped off.
Return value expected - 2013-05-25T17:10:12-05:00
Return value actual - 2013-05-25T17:10:12

Parameter is used inside the custom ESQL function.

Quote:

Why not just use plain ESQL?


Unfortunately I am forced to use mapping node. I am using ESQL but inside mapping node to handle this date field.
Back to top
View user's profile Send private message
goffinf
PostPosted: Sun May 26, 2013 10:48 am    Post subject: Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Quote:

I need to iterate through an xml to get the date value.


Can't you just point directly at it using XPath ?
Back to top
View user's profile Send private message
vetric2k
PostPosted: Sun May 26, 2013 11:11 am    Post subject: Reply with quote

Newbie

Joined: 22 May 2013
Posts: 4

Hi goffinf,
Quote:
Can't you just point directly at it using XPath ?


Tried with custom XPATH, custom Java from mapper node, but no luck.

As I said unfortunately, I can't come out of mapper node.

Expecting, any possible solutions by using mapper node, from here.

Thanks again.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon May 27, 2013 1:53 pm    Post subject: Reply with quote

Grand High Poobah

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

Sounds like you should be using GMTTIMESTAMP where you are using TIMESTAMP.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vetric2k
PostPosted: Mon May 27, 2013 7:19 pm    Post subject: Reply with quote

Newbie

Joined: 22 May 2013
Posts: 4

Hi Saper..
I have checked it. Its only GMTTIMESTAMP.
There is some thing in mapper that blocks me to output timezone.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon May 27, 2013 8:47 pm    Post subject: Re: problemConvertingFrom date to dateTime-Mapping node-v8.0 Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

vetric2k wrote:
Works great when using plain ESQL but problem exists when using ESQL inside mapping node. Only Timezone portion from dateTime field alone getting truncated.

The Mapping node seems to use the non-timezone aware ESQL datatypes when converting to/from XML Schema datatypes. It may rely on the implicit (local) timezone.

vetric2k wrote:
Incoming Parameter type - xsd:date ('yyyyMMdd')
Return Value expected - xsd:dateTime ('yyyy-MM-dd''T''HH:mm:ssZZZ')
Return value actual - 'yyyy-MM-dd''T''HH:mm:ss'
...
Tried with Custom Java, Custom XPath in place of ESQL but no luck.

Posting some actual code might help. How is an incoming xsd:date mapped into an outgoing xsd:dateTime?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » problemConvertingFrom date to dateTime-Mapping node-v8.0.0.2
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.