create input mask "yyyy-mm-dd"

P

Philly

I am trying to convert the dates in my query from the format of mm/dd/yyyy to
yyyy-mm-dd and it is driving me crazy. They will not upload into another
registry if not in that format. I would appreciate ANY assistance.
 
B

BruceM

You want to format the date. The input mask is of limited use only for
entering data. At the top of a blank column in query design view you could
have something like:
NewDate: Format([YourDateField],"yyyy-mm-dd")
Use your actual date field name in place of YourDateField.
See Help for more information about the Format function.
 
M

Marshall Barton

Philly said:
I am trying to convert the dates in my query from the format of mm/dd/yyyy to
yyyy-mm-dd and it is driving me crazy. They will not upload into another
registry if not in that format. I would appreciate ANY assistance.


You can just set the field Format property to yyyy-mm-dd

But, it is a poor practice to use a query's sheet view to
display data. Much better is to create a form, even if the
form displays in datasheet view, and set the Format property
of the date field's text box.
 
C

Carl_and_Earl

You can just set the field Format property to yyyy-mm-dd

I tryed 2 days to find how to do that, thanks :)

"You can just set the field Format property to yyyy-mm-dd "
 
J

John Spencer

Open up the query in design view,
Click in the grid on the field
Enter the string in the Format property (right click to get properties
if they are not showing)

If you are working with the records on a form - which you should be.
In design view
-- Click on the control
-- In the control's format property, enter
dd/mm/yyyy

This does assume that the field is a dateTime field.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Joined
Dec 31, 2015
Messages
1
Reaction score
0
I want to format date/time to international standard (2015-12-31 08:15) in a locale where the standard is 31/12/2015 08:15. So I set the date field type to date/time and the Format property to yyyy-mm-dd hh:nn and the input mask to "\2\000\-00\-00\ 00\:00"

This creates two problems:

1. When I press F2 to edit the field, the date is converted to the locale format and also show seconds 31/12/2015 08:15:00. If I try to alter say only the hour, the system keeps the locale format and flags an invalid entry. I must literally change the date to conform so it created extra work instead to making things easier.

2. If I do not press F2, but just click on the digit I want to alter, and type another digit, the entry will also be flagged as invalid even though the date/time exactly conforms to the format set.

How do I get around this and make it easy for the person doing the data entry? (Access 2010)
 

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

Top