Converting a serial number into date

chris-b95

New Member
Hallo friends,In an Excel sheet I will receive the data, which in turn I need to upload it to sql server and then implement the logic. I have received a date field --[Due Date] as number ex:-.40317. In Excel if you right click it and then format it to a date. It will show the correct date as 19.05.2010.So after uploading the file as it is. I have used\[code\]SELECT (dateAdd(day,[Due Date],'1900-01-01')) FROM table1.\[/code\]Assuming that Excel counts the days from 01-01-1900. So I am adding the number--[Due Date] Which should give me the proper formatted date..But this returns me a value of 2010-05-21 00:00:00.000. Can you please help me whether by assumption that Excel counts from 01-01-1900 is wrong..or the procedure that I have used is wrong to give such a value.
 
Top