Can anyone help with the folowing??
All I want to do is list the rows where the date is greater than todays date, below is what I have:
<%
dim conn
dim gigsRS
dim datToday
dim sqlTxt
datToday = Date()
set gigsRS = Server.CreateObject("ADODB.Recordset"
set conn = Server.CreateObject("ADODB.Connection"
conn.Open "DSN=wellyDSN"
sqlTxt = "SELECT dayOfWeek, gigDate, nameOfNight, venue, townCity FROM gigsTable WHERE gigDate >= #" & datToday & "# ORDER BY gigDate"
gigsRS.Open sqlTxt, conn
%>
This just lists all the records in the DB. The DB field is in Short Date format (04/09/01), and the date produced by Date() is also Short Format...
But the only way I can get it to work is if I hard code the datToday variable with the following format:
datToday = "04/09/2001"
Can I produce a date in asp with a 4 digit year????
Any help with this will be much appreciated..
Cheers in advance..
Paul.
All I want to do is list the rows where the date is greater than todays date, below is what I have:
<%
dim conn
dim gigsRS
dim datToday
dim sqlTxt
datToday = Date()
set gigsRS = Server.CreateObject("ADODB.Recordset"
set conn = Server.CreateObject("ADODB.Connection"
conn.Open "DSN=wellyDSN"
sqlTxt = "SELECT dayOfWeek, gigDate, nameOfNight, venue, townCity FROM gigsTable WHERE gigDate >= #" & datToday & "# ORDER BY gigDate"
gigsRS.Open sqlTxt, conn
%>
This just lists all the records in the DB. The DB field is in Short Date format (04/09/01), and the date produced by Date() is also Short Format...
But the only way I can get it to work is if I hard code the datToday variable with the following format:
datToday = "04/09/2001"
Can I produce a date in asp with a 4 digit year????
Any help with this will be much appreciated..
Cheers in advance..
Paul.