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 » Timestamp issue

Post new topic  Reply to topic
 Timestamp issue « View previous topic :: View next topic » 
Author Message
pradha
PostPosted: Sun Feb 10, 2008 10:03 pm    Post subject: Timestamp issue Reply with quote

Newbie

Joined: 10 Feb 2008
Posts: 7

How to get '12:00:00.000+05:30' in the output message when timestamp '2001-01-01'T'12:00:00+05:30' being input message. I get only 12:00:00 in the output message as MB fails to retrieve time zone along with time. Can anyone give me a solution for this issue.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 11, 2008 1:20 am    Post subject: Re: Timestamp issue Reply with quote

Grand High Poobah

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

pradha wrote:
Can anyone give me a solution for this issue.


If you told us what version of broker and posted the code giving the incorrect result then possibly yes.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pradha
PostPosted: Mon Feb 11, 2008 1:34 am    Post subject: Timestamp issue Reply with quote

Newbie

Joined: 10 Feb 2008
Posts: 7

Thank u for having replied me.
Broker version 6

Code : SET messagedate = SUBSTRING(CAST(InputHdrRef.nsNGSubRed:Timestamp AS CHARACTER) FROM 12 FOR 10);

SET OutputHdrRef.MsgDate = CAST(messagedate AS DATE);

SET OutputHdrRef.MsgTime = SUBSTRING(CAST(InputHdrRef.nsNGSubRed:Timestamp AS CHARACTER) FROM 23 FOR 8 );

Input timestamp----2001-01-01'T'12:00:00+05:30
source data type is datetime (ie for field timestamp) format:-(yyyy-mm-dd'T'HH:mm:ssZZZ).
target data type is string (ie for msgtime)
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 11, 2008 1:57 am    Post subject: Reply with quote

Grand High Poobah

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

Why are you not maniputlating the timestamp directly, using EXTRACT or similar?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pradha
PostPosted: Mon Feb 11, 2008 2:03 am    Post subject: Timestamp issue Reply with quote

Newbie

Joined: 10 Feb 2008
Posts: 7

It is the mapping field and also I have found that we can extract Time zone only from Local_Timezone. Do u have any solution for that.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 11, 2008 2:40 am    Post subject: Re: Timestamp issue Reply with quote

Grand High Poobah

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

pradha wrote:
I have found that we can extract Time zone only from Local_Timezone.


Really?

How have you arrived at this conclusion?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
pradha
PostPosted: Mon Feb 11, 2008 2:49 am    Post subject: Reply with quote

Newbie

Joined: 10 Feb 2008
Posts: 7

I found that extract function is used as following,
---------------------
EXTRACT(YEAR FROM CURRENT_DATE)
and
EXTRACT(HOUR FROM LOCAL_TIMEZONE)
both work without error, but
EXTRACT(DAY FROM CURRENT_TIME)
fails.
EXTRACT (DAYS FROM DATE '2000-02-29')
calculates the number of days encountered since year 1 to '2000-02-29' and
EXTRACT (DAYOFYEAR FROM CURRENT_DATE)

----------------------
Then tell me how to extract field values using EXTRACT function that too time zone in particular.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 11, 2008 3:03 am    Post subject: Reply with quote

Grand High Poobah

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

pradha wrote:
EXTRACT(DAY FROM CURRENT_TIME)
fails.


DAY is a date function, not a time function.

pradha wrote:
Then tell me how to extract field values using EXTRACT function that too time zone in particular


EXTRACT parameters and their uses are documented in the ESQL reference.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » 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.