Hi im a bit stuck on querying with dates. ive got a databse that querries using sql in visual basic 6.
I need to select only the dates which have passed or are today.
But the query returns all the records regardless of if the date has not passed
eg
I also tried like this
And like this
They all had a result either consisting only of one that was equl to the current date or all of the records.
in advance Thanks ........Extreme ly Thankfull for any tips
I need to select only the dates which have passed or are today.
But the query returns all the records regardless of if the date has not passed
eg
Code:
todaydate = format(date, "dd/mm/yyyy") frmCars.Cars_Data.RecordSource = "select * from car_Rentals WHERE (Format(due_service,'dd/mm/yyyy') >= " & "'" & todaydate & "') And (Format(due_service,'dd/mm/yyyy') = " & "'" & todaydate & "')" frmcars.cars_data.refresh
Code:
todaydate = format(date, "dd/mm/yyyy") frmCars.Cars_Data.RecordSource = "select * from car_Rentals WHERE (Format(due_service,'dd/mm/yyyy') > " & "'" & todaydate & "') And (Format(due_service,'dd/mm/yyyy') = " & "'" & todaydate & "')" frmcars.cars_data.refresh
Code:
todaydate = format(date, "dd/mm/yyyy") frmCars.Cars_Data.RecordSource = "select * from car_Rentals WHERE (Format(due_service,'dd/mm/yyyy') >= " & "'" & todaydate & "'" frmcars.cars_data.refresh
in advance Thanks ........Extreme ly Thankfull for any tips
Comment