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 » DateTime to Date

Post new topic  Reply to topic
 DateTime to Date « View previous topic :: View next topic » 
Author Message
adi717
PostPosted: Tue Oct 29, 2013 9:44 am    Post subject: DateTime to Date Reply with quote

Newbie

Joined: 29 Oct 2013
Posts: 3

I'm using version 9(Integration bus) trying to cast DateTime(XMLNSC) to Date(Text).
MQInput--Comput(using CAST function to change to output format)---MQout

DateTime format: yyyy-mm-ddThh:mm:ss.Z(Datetype is STRING in my schema)

To

Date: MMddyyyy(Data type is Date in my schema)

It's throwing me an error(The DFDL serializer cannot convert the xs:string value '2013-10-15T15:08:01.768-07:00' to the declared type 'xs:date').

Please help
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Oct 29, 2013 10:28 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Let's try to understand what you are trying to do.

1) you get a message that is XML formatted and you parse it using the XMLNSC Parser

2) You want to extract the date part of a timestamp and put it into the format you want(Silly american format)

3) You want to output the data as a 'flat file' type to a queue.

If this is true, you can do this without needing the DFDL Parser on the output side. It might be easier to do that if you are not really familiar with the DFDL parser and how to set the model up correctly.

You could cast the CHAR that you have formatted as a BLOB and make that the output message (OutputRoot.BLOB.BLOB).
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
adi717
PostPosted: Tue Oct 29, 2013 10:43 am    Post subject: Reply with quote

Newbie

Joined: 29 Oct 2013
Posts: 3

Thanks for your reply.

Here my requirement is to use DFDL in my output schema because i need to do padding and also i have 19 elements to transform including datetime to date element.

DateTime to Date is one of the element.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Oct 29, 2013 11:00 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Ok so make the DFDL model element for this field an xs:string then the Parser won't try to format it as a date. After all, you have already formatted it properly.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
adi717
PostPosted: Tue Oct 29, 2013 11:12 am    Post subject: Reply with quote

Newbie

Joined: 29 Oct 2013
Posts: 3

I changed both the schema(In and out) datatypes to string, it's still throwing me error.

both the schemas datatypes as strings.


Can we change DateTime to Date in version 9?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Oct 29, 2013 11:48 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Take a user trace and get the FULL error output and post it here.

We really can't help much without more details.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » DateTime to Date
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.