I am doing some basic SQL Lite database work via a C# application. I have followed the tutorial here and have the basics working with no problem whatsoever. However, the database I am working with has some UNIX timestamps in it. I am looking to convert these to standard time. This again I have completed with no problem by simply adding the seconds onto the UNIX start time (1/1/1970).
However, my problem comes when I wish to cast this data back to a dataGridView. As the data has already been inserted into the grid view it has clearly formated the time column as an Int64 (from the UNIX seconds value) but I am trying to cast a DateTime value back to it thus resulting in an error.
Even if I amend the data before casting it to the dataGridView I still get this error which suggests there is something further going on here behind the scenes. I would assume that the way I am querying the DB is also bringing back this formatting.
Thanks in advance for any help!!
Instead of converting the unix timestamp in C#, you can use SQLite DateTime Function and then bind it to the datagridview