http://support.microsoft.c
"The Now() function returns a double-precision number that represents the current date and the current time"
Main Topics
Browse All TopicsI have an asp program which updates a MSAccess data base. I would like to add the current date to each record. How do I get the current date.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
http://support.microsoft.c
"The Now() function returns a double-precision number that represents the current date and the current time"
>>Illegal assignment: 'dateValue'
You got that error because dateValue itself is a function!
http://msdn.microsoft.com/
try use another variable name instead, like:
<%
mydateValue=now()
%>
>>I would like to add the current date to each record. How do I get the current date.
Actually you can do it without any scripting on ASP, try open your Access database, then open the table in design view, select the date field, and on its Property > Default, set the value as:
=Now() , if you want to save current date and time
=Date() , if you want to save current date only
No need scripting, and problem resolved, cheers
Please clarify, do you want the current date for each NEW record or do you want to update a date column with the current date for ALL records?
ryancys has an excellent solution but that will give new records the current date. The date field will remain unchanged for all existing records. If you want to update all records with the current date, (I don't mean to offend you) you might want to rethink what you are doing. That is a lot of wasted space. An entire field will have the same value for all records.
>>The date field will remain unchanged for all existing records....
Sure, in that case, you need to have an additional field called as "Updated" to store the update date/time accordingly..
>>strSQL=strSQL & ", DateTested='" & FormatDateTime(Cdate(Date)
or can be simplify as:
strSQL=strSQL & ", DateTested= Now() "
Business Accounts
Answer for Membership
by: arantiusPosted on 2005-01-12 at 16:54:44ID: 13030409
Try the NOW function.