Sending DateTime Data to an Adapter Configuration

When TIBCO ActiveMatrix Adapter for Database (TIBCO Business Studio) publishes messages including datetime data, the wire format is handled implicitly since because Publication Service and Subscription Service use the same format.

In many scenarios, however, a separate product acts as a publisher, that is, you must explicitly specify the wire format. For example, an adapter configuration can subscribe to messages published by another TIBCO product instead of the adapter, such as TIBCO ActiveMatrix BusinessWorks, after some transformation has been performed.

Messages containing datetime data sent to the adapter must have that data in a string format. By formatting dates as strings, the adapter handles date values outside the range supported by RVMSG_DATETIME, January 1, 1970 to January 1, 2034. The adapter TRA properties also include a few date and time patterns that you can specify to use.

adbDateTime Object

To view the structure of the adbDateTime object, go to the Project Explorer view, and expand AESchemas > ae > ADB > adbmetadata.schema > Classes > adbDateTime > dateTime.

The input is a string value in one of the following formats:
  • yyyy-mm-dd
  • yyyy-mm-dd hh:mm:ss.xxx

    where xxx represents the millisecond value.

Note: Do not change any adbDateTime object information in your screen. Use this information to determine how to format the third-party subscriber date value.
Note: Timezone values are not supported.

The adapter returns an error when the input data contains timezone information. You can use the TIBCO BusinessWorks XPath function to parse the time zone information before the information is passed to the adapter.

Specifying Date and Time Patterns

You can use properties in the adbagent.tra file to specify the date, time, and timestamp format patterns. The TRA properties include:
  • adb.datePattern: the date format pattern for java.text.SimpleDateFormat. The default format is yyyy-MM-dd.
  • adb.timePattern: the time format pattern for java.text.SimpleDateFormat. The default format is HH:mm:ss.
  • adb.timestampPattern: the standard timestamp format pattern for java.text.SimpleDateFormat. The default format is yyyy-MM-dd HH:mm:ss.S.