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 both Publication Service and Subscription Service use the same format.

In many scenarios, however, a separate product acts as a publisher, which means that 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 usinessWorks, after some transformation has been performed.

Messages containing datetime data sent to the adapter must have that data in a string format. Formatting dates as strings allows the adapter to handle date values outside the range allowed by RVMSG_DATETIME, January 1, 1970 to January 1, 2034.

The default format used by the adbDateTime metadata class is described in this section. 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 timezone 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: This is the date format pattern for java.text.SimpleDateFormat. The default format is yyyy-MM-dd.
  • adb.timePattern: This is 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.