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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting date()

Status
Not open for further replies.

UmaGrama

Technical User
Sep 8, 2003
33
0
0
BR
How can I get today's date in M.Access? I am aware of the function =Date() but for some reason it does not return me the date (it gives #none? in return). If I use =Now() it works fine but I get the time with it which is not my interest.

Any ideas?
 
You can use format(Now(),"dd/mm/yy") but I think that date() should work anyway...
 
I have tried using in the code and as a data source of an object and they both dont work. I also tried adding clicking on Insert and then Date/Time but that doesnt work either.

I am going to try using nicsin's suggestion.
 
If you want todays date to show as the default value in a field on a form then set the Default value in the Table to
=Date()

If that doesn't work then you probably have a reference problem. While I don't argue using nicsin's suggestion there are a couple things you should know. First, the Format function returns the value as Text and not as a date. Second, if you don't fix the problem now, it will continue to plague you as you develop this Db and may plague anyone else trying to use it. Just my 2 cents worth.

Paul
 
UmaGrama,

I totally agree with Paul. Although what I suggested may work once, it is not a permanent solution. As Paul mentioned it must be a reference problem. I'd say you should add your references from the beginning.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top