By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,586 Members | 2,445 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,586 IT Pros & Developers. It's quick & easy.

DB2 UDB LUW Time stamp conversion

P: 5
I think time is kept as milliseconds as a bigint from 1970-01-01. I may be wrong on that but it will do for example.

If I have a bigint value from a table that represents a time, 1171906776010. How do I convert it to timestamp format?
Feb 19 '07 #1
Share this Question
Share on Google+
2 Replies


P: 1
Has anyone replied to your question? If yes, please e-mail it to me.
Nov 2 '07 #2

docdiesel
Expert 100+
P: 297
Hi all,

there're two points to say about this.

1) If there was an unposted answer or you solved the problem another way, please share with others and post the solution here.

2) Since your talking about seconds since newyearsday 1970, I think 1171906776010 seconds from that would be far too far into the future. But try this one to get a timestamp:

Expand|Select|Wrap|Line Numbers
  1. SELECT
  2.   (timestamp('1970-01-01-00.00.00') + 1171906776 seconds) AS CALCULATED_TS
  3. FROM
  4.   SYSIBM.SYSDUMMY1 ;
  5.  
  6. CALCULATED
  7. --------------------------
  8. 2007-02-19-17.39.36.000000
  9.  
  10.   1 record(s) selected.
Regards, Bernd
Nov 5 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.