I am trying to display some dates stored in a MS SQL Server database. I have been successful with the out tags in Word, but can not seem to get the same results in Excel.
In Word, my dates are returned and formated according to my local settings. In Excel, I get the SQL Server internal numeric representation of a date.
I am using version 6.0.2.0 with Office 2003. I have the 2007 file conversion installed. As a test, I have created the following very simple data structure and Excel file:
create
table datetest
(
col1 datetime null)
go
insert
into datetest
(
col1)
values
(
'12/31/2007')
go
Autotag in Excel: <wr:out select="select col1 from datetest where 1=1" type="DATE"/> gives this result: 1199080800000
The same tag in Word gives this result: 31-Dec-07
I'm sure i'm doing something wrong, just can't figure out what.