|
Timezone - Date Formatting Issue
Posted: 18 Jul 07 5:07 PM
|
Here's a tricky one: I am doing a SELECT statement of a single row from the ACTIVITY table via the SLX OLE DB Provider (v7.0).
I am specifing Central Standard Time as the Timezone paramerter in my connection string. The GMT date in ACTIVITY.STARTDATE is a follows: 2007-07-18 18:00:00.000
Here is the select statement to the OLE DB provider: select STARTDATE as Date1, convert(varchar(25), STARTDATE, 100) as Date2 from ACTIVITY where activityid = 'V6UJ9A000011'
Here are the results: Date1: 2007-07-18 13:00:00 Date2: Jul 18 2007 6:00PM
Notice how Date1 correctly adjusts the time (-5 hours) based on the Timezone extended parameter, however, when I attempt to format the date to USA AM/PM format in the query, the Timezone adjustment is lost!
I would like to display time in AM/PM format. Due to limitations in the external app, I am unable to perform any post-result formatting after the SELECT statement is executed, so I must perform the conversion to AM/PM formatting within the SELECT statement itself.
Is this possible with the SLX OLE DB Provider?
Ideas, fixes, suggestions appreciated. |
|
|