Re: querying for dates mssql.

2005-10-14 Thread Daniel Kang
You can simply compare now () +7 against toexpire. Daniel On 10/14/05, Protoculture <[EMAIL PROTECTED]> wrote: > I need a query that will return all records that are set to expire ( column > name "toexpire" - which is just a date ) in the next 7 days. > > select * from mytable > where toexpire ?

RE: querying for dates mssql.

2005-10-14 Thread Bobby Hartsfield
Mysql has date_add and adddate (and tons more date function) should be pretty easy. Check here http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html bookmark it...bookmark it... bookmark it ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Messa

RE: querying for dates mssql.

2005-10-14 Thread Justin D. Scott
> I need a query that will return all records that are > set to expire ( column name "toexpire" - which is just > a date ) in the next 7 days. > select * from mytable > where toexpire ??? WHERE toexpire > getdate() AND toexpire <= DATEADD(dd, 7, getdate()) -Justin Scott