Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Now() function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lamar - 01 Nov 2006 17:25 GMT
On form when staff enter that a task is completed then in the underlining
table the completed date is automatically entered.  In the field [Completed
Date] the Default Value is the Now() function.

So this is what is entered into the [Completed Date] field:  11/1/2006
7:57:24 AM

I just want the date (11/1/06) not the time (7:57:24 AM).  The time is
causing me problems when I try to query out the information.  Using input
mask or format does not work.  Is there a way that the [Completed Date] can
automatically be entered but just the date?

Also, how can I change the dates already entered?  Just changing the input
mask or format does not help when I try to query the information out?

Thanks for any help
Cyberwolf - 01 Nov 2006 17:42 GMT
Use DAte() instead of Now()
Signature

James Gaylord
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf

> On form when staff enter that a task is completed then in the underlining
> table the completed date is automatically entered.  In the field [Completed
[quoted text clipped - 12 lines]
>
> Thanks for any help
fredg - 01 Nov 2006 17:49 GMT
> On form when staff enter that a task is completed then in the underlining
> table the completed date is automatically entered.  In the field [Completed
[quoted text clipped - 12 lines]
>
> Thanks for any help

If you just want the Date portion use Date() instead of Now() for the
new entries.
To change the existing values from date and time to just date, use an
Update Query:

Update YourTable Set YourTable.DateField = int([DateField]);
or ...
Update YourTable Set YourTable.DateField = DateValue([DateField]);
Also look up DateValue in VBA help

Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.