Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to update current date and time in an databasefield

Status
Not open for further replies.

leifoet

Technical User
Jan 31, 2016
206
BE
I update certain database fields with an ado connection
Set adoCon = Server.CreateObject("ADODB.Connection")
...
'Update the record in the recordset
rsUpdateEntry.Fields("Stts1") = Request.Form("Stts1")
rsUpdateEntry.Fields("Stts2") = Request.Form("Stts2")
That works fine.

Now I added the fields 'date' and 'time' to the (Access)database.
I want to update these fields with the (user-system) date and time - The update code below does not work

rsUpdateEntry.Fields("Dateact") = date()
rsUpdateEntry.Fields("Timeact") = time()

Thanks for help.
 
Problem solved - I typed a typo in a field - sorry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top