Search
Friday, October 10, 2008 ..:: Forum ::.. Register  Login
 
  Forum  Templates  Excel  Displaying dates in Excel with SQL data source
Previous Previous
 
Next Disabled
New Post 3/11/2008 2:16 PM
  hanebch
4 posts
No Ranking


Displaying dates in Excel with SQL data source 

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.

 
Previous Previous
 
Next Disabled
  Forum  Templates  Excel  Displaying dates in Excel with SQL data source
Membership Membership:
Latest New User Latest: mooncui
New Today New Today: 0
New Yesterday New Yesterday: 0
User Count Overall: 59

People Online People Online:
Visitors Visitors: 0
Members Members: 0
Total Total: 0

Online Now Online Now:
All contents copyright (c) 2002 - 2008 by Windward Studios, Inc. All Rights Reserved.   Terms Of Use  Privacy Statement