RE: Date caculation is a select query

2002-12-04 Thread Chris Kay
- -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 4:28 PM To: Chris Kay; [EMAIL PROTECTED] Subject: Re: Date caculation is a select query At 11:03 +1100 12/4/02, Chris Kay wrote: >How would I go ab

Re: Date caculation is a select query

2002-12-03 Thread Bruce MacDonald
Chris, >would someone mind giving me a example query >where I would add 21 days to a datetime field Mysql, query mysql> create table member ( -> dt datetime ); Query OK, 0 rows affected (0.09 sec) mysql> insert into member values ('1991-06-22 14:00:00'); Query OK, 1 row affected (0.05 sec)

Re: Date caculation is a select query

2002-12-03 Thread Paul DuBois
At 11:03 +1100 12/4/02, Chris Kay wrote: How would I go about grabbing all records where a field is older than 21 days and set to a certain status. Dunno what you mean by "set to a certain status", but the other part will be: WHERE datetime_field < DATE_SUB(NOW(),INTERVAL 21 DAY) I tried INT

Date caculation is a select query

2002-12-03 Thread Chris Kay
How would I go about grabbing all records where a field is older than 21 days and set to a certain status. I tried INTERVIAL 21 Day but I cant seem to get it to work Field in the database is datetime Am I doing something wrong? Or is there a easier way to do this, would someone mind giving me a