Click to See Complete Forum and Search --> : Date defined variable


nookiemon
04-23-2006, 07:07 PM
Hi, hope I'm in the right forum as my web page is in asp, though I might be asking a database question :confused:

Heres my date variable

<% Dim DateToday
DateToday = date()
%>

Question is how do I get it into my SQL query? I've got this so far

sSQL="SELECT schedules.Date, schedules.Time, schedules.Show FROM schedules WHERE (((schedules.Date)=#2/1/2006#))"

I want to replace #2/1/2006# with todays date.

Think it'll be a real easy answer :eek:

Many thanks

chrismartz
04-23-2006, 07:58 PM
If you just use your variable you created, you can do:
sSQL="SELECT schedules.Date, schedules.Time, schedules.Show FROM schedules WHERE (((schedules.Date)=#" & DateToday & "#))"

nookiemon
04-24-2006, 03:00 PM
Thanks chrismartz

Worked a treat as they say :D