[EMAIL PROTECTED] wrote:
<snip>

You are right. There are a lot of date functions in MySQL. However, I am not sure exactly what your needs are...

I think you are trying to compute date intervals (did you NOT see the INTERVAL keyword when you RTFM?). Most of the date functions currently supported are for v4.1 or newer and you didn't say which version you are on. The pre-v4.1 way of doing date math is to convert your datetime values into seconds, add or subtract some number of seconds, then convert your answer back into a date. To do that you need the UNIX_TIMESTAMP()/FROM_UNIXTIME() pair of functions (
http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html)
<snip>

Time to reread the fine manual. DATE_ADD() and DATE_SUB() existed in mysql 3.23.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to