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

How to get date without time. 1

Status
Not open for further replies.

needadvice

Programmer
Apr 7, 2002
145
US
I have a data entry form with a text box that holds the current date. The date is set by default(date() in the default property setting.) This process is transparent to the user.
This method saves the date with the time. My user wants to sort on date. with the time included he only gets one record.(time specific).
I've set every option to "short date" but the time still appears. How can I save just the date?
 
AFAIK, Date() returns only date portion, date and time is returned by Now().

combo
 
The default is Date() but it still goes into the table with the time.
 
Any value stored in a date/time field will have both date and time, no matter what you do. That is the way things are stored in Access/Jet.

If you need to store just a date, with no time, you can get creative, storing it as text, a number, or three numeric fields.

But there's no way to change the field type.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top