Now()

P

pokdbz

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?
 
K

Ken Snell [MVP]

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>
 
P

pokdbz

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?
 
S

schasteen

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
 
M

Micah Chaney

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?
 
S

Steve Schapel

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.
 
K

Ken Snell [MVP]

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?
 
P

pokdbz

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
 
Top