![]() |
|
|
Insert Date and Time into AccessIn the previous snippet we inserted a date into an Access database. Our new Function AccessDateTime will add the time as well in the format HH:MM:DD. The function AccessDateTime returns the date and time in YYYY-MM-DD
HH:MM:DD format. When working with a date in Access always use the # delimiters
in your SQL statement. <% Dim connection SQL="INSERT INTO tblDate (dDate) VALUES (#" & AccessDateTime(NOW()) & "#)" sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _ Connection.Close 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. |
|