Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Open Ro w Set

Author  Topic 

sanjay5219
Posting Yak Master

240 Posts

Posted - 2014-11-03 : 12:49:00
Hi All,

I am downloading Excel from SQL via Openrowset and it is working fine but we are facing one situation that even though date column is in datetime datatype. When data is extracting Excel it is changing into text.

if my database value is 01/01/2014 and when i am exporting it is coming as 1jan 2014 in Excel. I tried to do convert function also but result is same

Please suggest how to do that

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-11-03 : 13:48:52
Modify the data type in the Excel file.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

sanjay5219
Posting Yak Master

240 Posts

Posted - 2014-11-04 : 23:56:38
Tara, can you please elaborate.you mean to say change the data type in sql
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2014-11-05 : 05:43:11
It means you need to format the EXCEL cell to display dates in the format you want

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -