Author Topic: How to convert db2 loaddate value to meaningful date  (Read 2649 times)

tjspencer2

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
How to convert db2 loaddate value to meaningful date
« on: April 28, 2015, 02:34:26 PM »
Does anyone know how to convert a loaddate into the data a report was loaded?


Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2230
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: How to convert db2 loaddate value to meaningful date
« Reply #2 on: April 29, 2015, 04:15:06 AM »
While using the arsdate command is preferred, the number represents the number of days since January 1st, 1970, UTC.

Programmatically, you can convert to UNIX epoch time format (number of seconds since January 1st, 1970, UTC) by simply multiplying by 86400 (the number of seconds in a day).  From there, you can use standard UNIX utilities to convert into human readable date/time formats.

If your load date is larger than 99999, then it's likely a date format, which is simply the same as UNIX epoch time format.

CMOD v9 and v9.5 can use internal database timestamps, which are generally presented in human-readable formats when queried in the database.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR