Solved

How make short date field on a form display only the month/day/year

Posted on 2014-10-19
11
199 Views
Last Modified: 2014-10-19
I have a date field on a form and the format is Short Date.  But I want it to only display for example 10/19/2014 when the focus is on the field.  Right now it shows for example 10/19/2014 9:10:38 AM

How can I change this?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390032
Instead of Short Date in the Format property of that particular control, use mm/dd/yyyy.

Ron
0
 

Author Comment

by:SteveL13
ID: 40390036
Didn't work.  It still shows "10/19/2014 9:10:38 AM" when the focus is on the field.  This is an unbound form if that helps.
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390075
Where is it getting that date/time if this is an unbound form?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:SteveL13
ID: 40390092
It is a form used to locate a record or records based on the date range the user enters.  See screen shot.

Then there is a query which is the record source for a report that uses:

Between [Forms]![frmname]![txtStartDate] and [Forms]![frmname][!txtStartDate] for the criteria.

All I need is for the date field(s) on the form to display just "10/19/2014"  instead of "10/19/2014 9:10:38 AM" when the focus is on the field
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390099
You forgot the screenshot.
0
 

Author Comment

by:SteveL13
ID: 40390142
Sorry.  Here are two... one before the date field gets the focus and one after the date field gets the focus.  You can see that the time starts to display (and would fully display if the field was longer.

before focus
after focus
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40390267
So you actually selected a date from the date picker calendar rather than entering something in the field?
0
 

Author Comment

by:SteveL13
ID: 40390288
The default of the date fields is =Now()

When I click on the date field as if I wanted to manually enter a date, the time shows up.
0
 

Author Comment

by:SteveL13
ID: 40390292
Or even if I just click on the date field to use the calendar date picker the time shows up.
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 500 total points
ID: 40390324
That explains it.  The function Now() includes the time.  You need to use the function Date() instead in the default value.
0
 

Author Comment

by:SteveL13
ID: 40390352
Thank you so much!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question