All Forums >> [Scripting] >> ASP >> NEED HELP WITH SHOW DATABASE INFORMATION BY DATE Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I uses access-database, with a tabel, 'tblClasses'. And a colum called 'recordDateShow'.
What i need help with is something like this:
<% date1 = DateSerial(year(date), month(date), day(date)) date2 = DateSerial(rsClasses.Fields.Item("ClassesDateShow").Value) if date1 >= date2 then response.write "Book now!" else response.write "Canīt book yet!" end if %>
This is how it shuld work:
If lets say if todays date is higher or the same as 'recordDateShow' is, then write 'Book now!'. But if 'recordDateShow' is higher then todays date, then write 'Canīt book yet!'.
The problem is I cant get it to work!
I not very good with this kind of scripts, could be complete wrong script for this? Or maybe I need to change the settings in the database?
date1 = Date date2 = rsClasses.Fields.Item("ClassesDateShow").Value if date1 >= date2 then
(Never call a volatile function like Date or Time more than once to set a single value; DateSerial expects 3 params, the field value is a Date (I hope))