I am using Formating function to format Date,most of the values come in DateTime Format which are sent to this function for Formating but sometimes i get values like 40544 in data which is a Long Value,Because of this i get DateTime Exception so I want to convert it into datatime.
When i paste this in Excel and format it to date it gives me 1/1/2011.How can i get same in C#.
Thanks.
I think you might be looking for
DateTime.FromOADate()but it is hard to say as your question is kind of vague.