List:General Discussion« Previous MessageNext Message »
From:Michael Stassen Date:August 24 2005 4:14am
Subject:Re: Date arithmetic: 2005-08-31 - 1
In-reply-to:
<OFF37D3101.2A45B1A9-ON85257066.006C2B4D-85257066.006E41B4@unimin.com>
View as plain text  
SGreen@stripped 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
Thread
Date arithmetic: 2005-08-31 - 1Barbara Deaton23 Aug
  • AW: Date arithmetic: 2005-08-31 - 1Freddie Sorensen23 Aug
  • Re: Date arithmetic: 2005-08-31 - 1SGreen23 Aug
  • Re: Date arithmetic: 2005-08-31 - 1Michael Stassen24 Aug
RE: Date arithmetic: 2005-08-31 - 1Gordon Bruce23 Aug
RE: Date arithmetic: 2005-08-31 - 1Barbara Deaton23 Aug
  • Re: Date arithmetic: 2005-08-31 - 1Peter Brawley25 Aug
Re: Date arithmetic: 2005-08-31 - 1Michael Stassen24 Aug