I have extracted the modification time of a file using the struct stat
structure:
long modtime = image_stats.st_mtime;
This returns 1508240128
.
Now, I wish to store this value into a MySQL table which has datatype as datetime. If I store it directly, it fails saying it is not a datetime format.
How do I store it?