I want to get all the fields from a row where the date from column “Date” is today’s date.
My code is
Dim today As Date = DateTime.Now
vandaag = Format(today, "dd/MM/yyyy")
"select * from tblPatients where PatientDate =" & today & ""
Can somebody help me please? It’s for school…
Actually, you do not need parameters at all in your query:
SELECT * FROM tblPatients WHERE PatientDate = DATE()If the PatientDate was a combined date-time, you could use:
SELECT * FROM tblPatients WHERE PatientDate BETWEEN DATE() AND DATEADD('d', 1, DATE())The Date()-Function will have a time-part as 0:00, so this will give you the right results for the current day.