Expert Answer Center > Expert Knowledgebase > View Answer
EMAIL THIS
Expert Knowledgebase
  EXPERT KNOWLEDGEBASE HOME        RSS FEEDS  
I have tried to get the number of seconds since 1970:
  1. I need the data as seconds and not millseconds
  2. The datatype for the result must be the equivalent to number in Oracle (Decimal?)
Is there something like this existing in DB2 for extracating the seconds as you can do with number of days?
SELECT (DAYS(current date) - DAYS('1970-01-01')) * 24 * 60 * 60
sysibm.sysdummy1
QUESTION POSED ON: 07 OCT 2004
QUESTION ANSWERED BY: Craig Mullins Well, it looks like you've already coded the best answer I could come up with. There is no DB2 function that returns the number of seconds in a day. Related Topics:

Search Advice from more than 250 TechTarget Experts
Your question may have already been answered! Browse or search more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice
ASSOCIATED RSS FEEDS

Expert Answer Center: Expert Q&As
View all RSS Feeds  |  RSS Info

HomeExperts on DemandIT Expert Webcast SeriesExpert KnowledgebaseSite Index
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  RSS  |  Site Map




All Rights Reserved, Copyright 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts