![]() |
|
|
Select Date from Access DatabaseIf you have read our tutorial on how to insert dates into an access database then you know that the safetest way is to insert the date in the format YYYY-MM-DD. Again when working with a date in Access always use the # delimiters in your SQL statement. The database is called 'dbDate', the table 'tblDate' and date field 'dDate'. The 'dDate' field is a DATE/TIME datatype. Our code selects all the dates that are the same as 2003-12-07 or come after using the greater than or equal sign. <% SQL="SELECT dDate FROM tblDate WHERE dDate>=#2003-12-07#" sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _ The SQL statement will select all the dates that are the same as today's date. <% Select records between a date range If you have any code snippets to share with full credit given then send an email to Codesnippets - You'll receive full credit and a link back to your site. Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|