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 » EXTRACT of SECONDS

Post new topic  Reply to topic
 EXTRACT of SECONDS « View previous topic :: View next topic » 
Author Message
petervh1
PostPosted: Wed Sep 01, 2021 3:29 am    Post subject: EXTRACT of SECONDS Reply with quote

Centurion

Joined: 19 Apr 2010
Posts: 122

Hi

I'm trying to obtain the value for the number of seconds from 1/1/1970 to a specific date.

Following (or so I thought) the example in the documentation, I modified

Code:
EXTRACT (DAYS FROM DATE '2000-02-29')


which
Quote:
calculates the number of days encountered since year 1 to '2000-02-29'
.

I have:

Code:
DECLARE tsec INT CAST(EXTRACT(SECOND FROM TIMESTAMP '2021-09-01 12:12:53' ) AS INT);


but it returns the number of seconds in the timestamp (53) and not the number of seconds since 1/1/1970.

Please can someone assist.

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 01, 2021 4:27 am    Post subject: Reply with quote

Grand High Poobah

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

Do an Interval calculation by substracting the time stamps and then express the interval in seconds. An Integer might not be big enough...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » EXTRACT of SECONDS
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.