Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting records between Two Dates

Status
Not open for further replies.

newbieDev

Programmer
Jun 11, 2007
38
US
Hello,

I am trying to write a query that selects students that enrolled between a two dates:

select firstname, lastname
from students
where startdate >= 10/1/2007
and startdate <= 09/30/2008

But this is not working for me because there is something I should be doing with the dates that I haven't done.

I also want to have displayed a 10/1/2007 date when the date is less than 10/1/2007 - I understand that this code will be in the html part - <cfif startdate lt 10/01/2007 .....> But this did not work either because the date.

Will really appreciate any help/advise.

Thanks!


 
I also want to have displayed a 10/1/2007 date when the date is less than 10/1/2007
But your query above won't have any dates less than 10/1/2007. So what you're saying doesn't make any sense at all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top