Difference between revisions of "Date and Time formats in Content Manager OnDemand"

From CMOD.wiki
Jump to navigation Jump to search
(More info on IBM CMOD date formats, and an example of IBM CMOD arsdate.)
m (Formatting of IBM CMOD arsdate example.)
Line 11: Line 11:


   129600 / 86400 = 1.5
   129600 / 86400 = 1.5
 
 
  A UNIX time format of 129600 is  noon on the second day of January, 1970.
A UNIX time format of 129600 is  noon on the second day of January, 1970.


== Old Formats ==
== Old Formats ==

Revision as of 22:40, 21 June 2017

Introduction

One of the most important field types in IBM Content Manager OnDemand is Date (and Time) formats. Timestamps appear in various locations in IBM CMOD -- Load IDs, the Segment Table, etc. There has been a slow evolution of date and time stamps, culminating with a switch to timestamp formats that are native to the various databases that OnDemand supports. This article will explain the historical time formats, describe how to convert them in a variety of ways, and demonstrate how you can use IBM CMOD date formats for special reports.

History

In the early 1990's when IBM CMOD was developed, two facts necessitated the IBM Content Manager OnDemand developers to use their own date formats: The high cost of data storage, and the lack of date and/or time formats in the database engines that were supported by OnDemand. The solution was to store dates as integers - representing the number of days since midnight, January 1st, 1970, UTC. If you're a UNIX or Linux user, you should recognize this date as the 'epoch' date - UNIX servers start counting the number of seconds since this date as their internal representation for dates for most operating system functions. In fact, IBM CMOD used UNIX epoch date/time as its internal date/time format up until IBM CMOD v9.5.

This relationship means you can fairly easily convert between UNIX epoch date/time format, and the IBM CMOD arsdate format - simply divide by 86400 -- the number of seconds in a day.

 129600 / 86400 = 1.5

A UNIX time format of 129600 is noon on the second day of January, 1970.

Old Formats

New Formats

Converting Between Old and New