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 » Insert timestamp with local timezone

Post new topic  Reply to topic Goto page Previous  1, 2
 Insert timestamp with local timezone « View previous topic :: View next topic » 
Author Message
maurito
PostPosted: Wed Feb 03, 2016 12:23 pm    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

well, no, you need to try something like
Code:

passthru ( insert into tablename  (col1, col2) values (value1, TIMESTAMP(whatever))


Having said that, if it works, you need to make sure that the data stored in the database is correct
Back to top
View user's profile Send private message
jgonz
PostPosted: Mon Feb 08, 2016 11:24 am    Post subject: Reply with quote

Novice

Joined: 20 Nov 2015
Posts: 16

maurito wrote:
well, no, you need to try something like
Code:

passthru ( insert into tablename  (col1, col2) values (value1, TIMESTAMP(whatever))


Having said that, if it works, you need to make sure that the data stored in the database is correct


Ahh, yes this works! I did the following:

Code:
      DECLARE startResult CHAR CAST(startTime AS CHAR FORMAT 'yyyy-MM-dd HH:mm:ss.SSSSSSZZZ');
      DECLARE endResult CHAR CAST(endTime AS CHAR FORMAT 'yyyy-MM-dd HH:mm:ss.SSSSSSZZZ');

      PASSTHRU('INSERT INTO TEST_TIMESTAMPS (
         TIMESTAMP_,
         TIMESTAMP_TIMEZONELOCAL,
         TIMESTAMP_WITH_LOCALTIMEZONE
         ) VALUES (?,
         TO_TIMESTAMP_TZ(?, ''YYYY-MM-DD HH24:MI:SS.FF6TZH:TZM''),
         TO_TIMESTAMP_TZ(?, ''YYYY-MM-DD"T"HH24:MI:SS.FF3TZH:TZM'')
         )',
         CAST(CURRENT_TIMESTAMP AS CHAR),
         startResult,
         endResult
         );
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Insert timestamp with local timezone
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.