Now()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im using the Now() but it puts the time with it also. Is there a way
elimate the time.
Or if there is something else I can use to get the date of today?
 
When I change it to Date() when i click away it changes it to DATE and
doesn't work
 
That means that you probably have a control or field named Date, and ACCESS
doesn't know whether you mean the control/field or the function.

Do not use Date as the name of a field or a control. It and many other words
are reserved words in ACCESS, and can create serious confusion for ACCESS
and Jet. See these Knowledge Base articles for more information:

List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335

List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266

Special characters that you must avoid when you work with Access
databases
http://support.microsoft.com/?id=826763
--

Ken Snell
<MS ACCESS MVP>
 
Is there a way I can use the Now() for now and remove the time part of it?
I will look through my program though to see if I can find the DATE problem.

Do you have a solution in the mean time for a quick fix?
 
I think you could use DateValue(Now()) to get the date, but I have never used
datevalue with now(). You really need to find the field or control and
change the name. It will make it a lot easier in the future
 
What are you using this function in? A Form, Query, Table, Report? I think
if you just go to the properties of that particular field, you can change
the format to mmddyyyy or whatever options you show there. Just be aware
Access is still gonna store the value as date/time, it will display just the
date though. Does that help?
 
Pokdbs,

You could use Int(Now()) but really there should be no need for this
working around.

You haven't mentioned where and how you are using this. I think others
have assumed it is in the Control Source of an unbound textbox... is
this correct? Or maybe it is in a calculated field in your query? Let
us know more details, including the meaning of "doesn't work", and maybe
the help offered could be more fucussed.
 
DateValue(Now())


--

Ken Snell
<MS ACCESS MVP>

pokdbz said:
Is there a way I can use the Now() for now and remove the time part of it?
I will look through my program though to see if I can find the DATE
problem.

Do you have a solution in the mean time for a quick fix?
 
Thanks for your help with this. I was working on someone elses program so
this will be the quick fix till I find out where the date problem is so I can
change that.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top