I am reading a sqlite file in which datetime column data are saved as integer values (INTEGER NO NULL)
DateTime dt=reader.GetDateTime(nColDateTime);
But it emits an error saying that the return value is not in correct format. I try out all other available methods in Datetime class and find only
DateTime dt=DateTime.FromBinary(reader.GetInt64(nColDateTime));
works (as others return exceptions). But the formatted date (as dt.ToShortDateTime()) is incorrect (ie 0042/11/20) I have no idea what this is. I then try this
long d=DateTime.Now.Ticks-reader.GetInt64(nColDateTime);
DateTime dt=new DateTime(d);
It gives me 1970/05/18
Could you help me to get the correct datetime ?