![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using SQL Server Express and ASP. I have a table that contains news articles, headlines, start and end dates. I am trying to create a recordset that shows all of the articles that are greater than or equal to the start date and less than or equal to the end date. For some reason I cannot get it to function properly using a statement similar to StartDate >= Now() AND EndDate <= Now(). SQL doesnt like the Now() piece of the statement. Anyone have an idea how I can get this to work? I have also tried CURDATE() but to no avail. |
#3
| |||
| |||
|
|
t8ntboy wrote: I am using SQL Server Express and ASP. I have a table that contains news articles, headlines, start and end dates. I am trying to create a recordset that shows all of the articles that are greater than or equal to the start date and less than or equal to the end date. For some reason I cannot get it to function properly using a statement similar to StartDate >= Now() AND EndDate <= Now(). SQL doesnt like the Now() piece of the statement. Anyone have an idea how I can get this to work? I have also tried CURDATE() but to no avail. StartDate <= GetDate() and EndDate >= GetDate() |
#4
| |||
| |||
|
|
I am using SQL Server Express and ASP. I have a table that contains news articles, headlines, start and end dates. I am trying to create a recordset that shows all of the articles that are greater than or equal to the start date and less than or equal to the end date. For some reason I cannot get it to function properly using a statement similar to StartDate >= Now() AND EndDate <= Now(). SQL doesnt like the Now() piece of the statement. Anyone have an idea how I can get this to work? I have also tried CURDATE() but to no avail. Please help. |
![]() |
| Thread Tools | |
| Display Modes | |
| |