Posted by J.O. Aho on 10/22/06 05:30
Desert Rider wrote:
> Unfortunately my data from the previous entries does not have
> timestamps available, only month, day, year and TOD (24 hr). I really
> need something that allows me to enter a date and time e.g. 4/21/2003
> 23:25 and then returns the proper timestamp in seconds since
> 01/01/1970. I could then enter that in the date>value field and it
> would put that date/time on the entry. I've done some googleing and
> have found various references to programming that will do that but way
> beyond my expertise. Even if I could find something that would
> accurately give me the amount of days say between 01/01/1970 and say
> 4/21/2003 I could then compute the seconds and then add the additional
> time for that day. Alas, I'm numeracy challanged and so require
> something pretty simple.
You can use DATEDIFF() to get differences between two dates/times or you can
directly use UNIX_TIMESTAMP().
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
//Aho
[Back to original message]
|