IBM Support

A way to import date values into TRIRIGA using user-friendly date formats

Question & Answer


Question

Is there a way to import date/time values into TRIRIGA using user-friendly date formats like 'dd/mm/yyyy hh:mm:ss' instead of epoch time?

Cause

All date/time values are stored in the TRIRIGA database as epoch time (number of milliseconds from 01/01/1970 00:00:00 GMT/UTC)

Answer

You can not import a date values directly into a TRIRIGA date/time fields using user-friendly date formats -- you have to import using epoch time.

What you can do instead is import the user-friendly date/time value into a text field in TRIRIGA and then use a workflow to convert the value to epoch time and store that converted value in the corresponding date/time field. One way of doing this is the following:

  1. Within your Business Object, create a custom text field that you can use to store your date/time value in a user-friendly format such as 'dd/mm/yyyy hh:mm:ss'
  2. Assuming you are importing your data using Data Integratior, do the following:
  • In the Data Integrator header, specify the text field you created to store your user-friendly date/time value
  • Create an asynchronous workflow to listen for triUploadHidden actions (or whatever action you choose to associate with your data upload). Have that workflow check to see if the date/time field in the record is null and, if so, to take the the user-friendly date/time specified in your text field and map it as an epoch time value in the actual date/time field.
  • When uploading your text file to Data Integrator, specify an action that is in line with what your workflow expects. IBM typically recommends using triUploadHidden, but you could use triCreateDraft or even create a cstUpload action which could be used to make the choice show up first in the list.
The following is an example of what this workflow might look like:

datetimefield.jpeg

[{"Product":{"code":"SSHEB3","label":"IBM TRIRIGA Application Platform"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.3;3.3.1;3.3.2;3.4;3.4.1;3.4.2;3.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21976407