View Single Post
Old 09-19-2012, 11:58 PM   PM User | #6
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Okay... It's too bad those are text fields, but luckily Access (JET) has an answer for that.

We can use *EITHER* the CNCRT_DATE or the CNCRT_DATESEQ field. Doesn't matter. Either will work. (But not the cncrt_dateasp field.)
Code:
SELECT * FROM concert_data 
WHERE CDATE(Cncrt_dateseq) BETWEEN DATE() AND DATE()+60
ORDER BY Cncrt_dateseq DESC
Try that! In Access, before you try using it in your ASP code.

Notice that you NO LONGER need to pass in Today and Future from the ASP code. Let Access do the date arithmetic for you!

If that works (and I'm 90% sure it will), then you can just convert it to ASP thus:
Code:
sql4 = "SELECT * FROM concert_data " _
     & " WHERE CDATE(Cncrt_dateseq) BETWEEN DATE() AND DATE()+60 " _
     & " ORDER BY Cncrt_dateseq DESC"
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote