troubleshooting Question

How to read a date column in excel using C#

Avatar of RakeshBhandari
RakeshBhandariFlag for India asked on
.NET ProgrammingC#Microsoft Excel
14 Comments1 Solution12632 ViewsLast Modified:
I have a column in excel storing information as date like "1-Jan-2010". I want to read this date and store it in database.
I am done with reading the excel, facing problem specifically for date field. While reading the date it comes returns a number, which is not at all linked to the date.
An alternative is to treat it as string by appending " ' " (i.e. to treat it as string and then do string manipulations) to all rows before i actually read it, but i dont want to do this.

Please suggest.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros