The datetime2 field from SQL Server is in the "yyyy-MM-dd HH:mm:ss" format using TIBCO DataDirect versions prior to 4.2, but the format changed to "yyyy-MM-ddTHH:mm:ss-Z" after version 4.2.

The datetime2 field from SQL Server is in the "yyyy-MM-dd HH:mm:ss" format using TIBCO DataDirect versions prior to 4.2, but the format changed to "yyyy-MM-ddTHH:mm:ss-Z" after version 4.2.

book

Article ID: KB0093391

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:

The datetime2 field from SQL Server is in the "yyyy-MM-dd HH:mm:ss" format (e.g.2014-09-15 10:56:19.39) using TIBCO DataDirect versions prior to 4.2, but the format changed to "yyyy-MM-ddTHH:mm:ss-Z" (e.g. 2014-09-15T10:56:19.393-04:00) after version 4.2.


Symptoms:
For the same date (e.g. 2014-09-15 10:56:19.39) different datetime2 formats returned using different versions of TIBCO DataDirect(DD) drivers:


1). With DD driver versions prior to 4.2, the returned format is: 2014-09-15 10:56:19.39 .

2). With DD driver version 4.2 and later, the returned format is: 2014-09-15T10:56:19.393-04:00 .
Cause:
Datetime2 field is available post SQL Server 2008. The TIBCO DataDirect(DD) driver was not supported for "datetime2" earlier and instead of using JDBC Data Type as "TIMESTAMP", it used "VARCHAR". The behavior of DD driver was incorrect in versions prior to 4.2. Support of "datetime2" has been added in version 4.2. The correct format is "yyyy-MM-ddTHH:mm:ss-Z" (e.g. 2014-09-15T10:56:19.393-04:00).

Issue/Introduction

The datetime2 field from SQL Server is in the "yyyy-MM-dd HH:mm:ss" format using TIBCO DataDirect versions prior to 4.2, but the format changed to "yyyy-MM-ddTHH:mm:ss-Z" after version 4.2.

Resolution

Use the latest version of the DD driver. To get the same string as older versions, use the XPATH expression :tib:format-dateTime('yyyy-MM-dd HH:mm:ss',<datetime2 field>) .



Additional Information

http://knowledgebase.progress.com/articles/Article/000033818