tags:

views:

40

answers:

1

Hi I am reading the Excel sheet in c# using interop services. My excel sheet have the date columns of formate dd/mm/yyyy. while reading , runtime i am getting some different values for each cell as :38840,38808,39873...so n so... what does that mean? please help.How to handle the date columns of the excel sheet in C#. please guide me.

A: 

This is covered in the following article:

http://bytes.com/topic/c-sharp/answers/530093-tough-date-conversion-problem-importing-excel

Richard Forss
thanks its working:need to write code like, double dbl = Convert.ToDouble(((Excel.Range)worksheet.Cells[iRowindex, colIndex_q12]).Value2); string strDate = DateTime.FromOADate(dbl).ToShortDateString();
Lalit