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

Added sections in IBM CMOD Dates SQL and IBM CMOD dates Excel.
(Updated all sections, provided more arsdate examples, linked to the CMOD knowledgebase.)
(Added sections in IBM CMOD Dates SQL and IBM CMOD dates Excel.)
Line 60: Line 60:
   17034 -> 08/20/16
   17034 -> 08/20/16


=== IBM CMOD arsdate command ===
== IBM CMOD Dates in SQL ==
If you're performing an SQL query in your OnDemand Database, and you want to convert from the internal date to a human readable date format inside the database engine, it takes a little extra work.  You need to add the number of days or seconds to the epoch date of January 1st, 1970.
 
You can use this function to get a date from a timestamp field: 
 
  date(TIMESTAMP('1970-01-01-00.00.00.000000') + int(max(RPT_TIME)/86400) days )
 
And this function to get a date from a date field:
 
  date(TIMESTAMP('1970-01-01-00.00.00.000000') + int(max(RPT_DATE)) days )
 
== IBM CMOD Dates in Excel ==
If you have CMOD table data in Excel, and you need to convert from an internal date, just add 25568 (the number of days since January 1st 1900 to January 1st, 1970.) and format it as a date.
 
  =(A1 + 25568)
 
Where the cell 'A1' contains a date in the CMOD internal date format.
 
== IBM CMOD arsdate command online help ==


   # arsdate
   # arsdate
Line 85: Line 103:
     -1 <trace_file>  Trace file
     -1 <trace_file>  Trace file
     -2 <trace_level> Trace level
     -2 <trace_level> Trace level
== More examples ==
== More examples ==
[https://www.ibm.com/support/knowledgecenter/SSEPCD_10.1.0/com.ibm.ondemand.administeringmp.doc/dodda003.htm IBM CMOD Knowledgebase: arsdate parameters]
[https://www.ibm.com/support/knowledgecenter/SSEPCD_10.1.0/com.ibm.ondemand.administeringmp.doc/dodda003.htm IBM CMOD Knowledgebase: arsdate parameters]


[https://www.ibm.com/support/knowledgecenter/SSEPCD_10.1.0/com.ibm.ondemand.administeringmp.doc/dodda004.htm IBM CMOD Knowledgebase: arsdate examples]
[https://www.ibm.com/support/knowledgecenter/SSEPCD_10.1.0/com.ibm.ondemand.administeringmp.doc/dodda004.htm IBM CMOD Knowledgebase: arsdate examples]