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 » DATE and TIMESTAMP issue

Post new topic  Reply to topic
 DATE and TIMESTAMP issue « View previous topic :: View next topic » 
Author Message
mail2me.venky
PostPosted: Mon May 28, 2012 11:15 pm    Post subject: DATE and TIMESTAMP issue Reply with quote

Apprentice

Joined: 11 May 2012
Posts: 26

My input date is 2012-05-21-12.14.43.770425+120

i want to to set the value for the following fields

SET OutputRoot.MRM.X.Y.Y_YR;
SET OutputRoot.MRM.X.Y.Y_DASH1;
SET OutputRoot.MRM.X.Y.Y_MNH;
SET OutputRoot.MRM.X.Y.Y_DASH2;
SET OutputRoot.MRM.X.Y.Y_DAY;
SET OutputRoot.MRM.X.Y.Y_DASH3;
SET OutputRoot.MRM.X.Y.Y_HOUR;
SET OutputRoot.MRM.X.Y.Y_DOT1;
SET OutputRoot.MRM.X.Y.Y_MIN;
SET OutputRoot.MRM.X.Y.Y_DOT2;
SET OutputRoot.MRM.X.Y.Y_SCD;
SET OutputRoot.MRM.X.Y.Y_DOT3;
SET OutputRoot.MRM.X.Y.Y_MSCD;
SET OutputRoot.MRM.X.Y.Y_SIGN;
SET OutputRoot.MRM.X.Y.Y_UTC;

which is right way to do it. ? EXTRACT FUNCTION or SUBSTRING?

I saw that from the EXTRACT function MSCD,SIGN, UTC could not be extracted

am i right ?

is there any other way to do it?

Tx
varun
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon May 28, 2012 11:40 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
which is right way to do it. ? EXTRACT FUNCTION or SUBSTRING?
Not this way. You have not explained the requirement. Where does the input data come from? If you are talking about using EXTRACt or SUBSTRING then you must have a string that contains the source data value. So why not use the facilities of the MRM parser to help you. Change the type in the input message definition to xs:dateTime and set the pattern correctly. The MRM parser will create a DATETIME field in InputRoot.MRM. If you want a different pattern in the output message, use a different message definition that specifies a different pattern for the dateTime.

Same logical dateTime value, different input and output formats.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 29, 2012 1:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I do not think you can use EXTRACT to get the values of DASH1, DASH2, or etc.

I do not think you have any real, legitimate need to get the values of DASH1, DASH2, etc.

As Kimbert says, use MRM or DFDL datetime parsing or at least CAST to extract the logical fields of the datetime values and then to reconstruct the transformed values into another 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 » DATE and TIMESTAMP issue
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.