Date format reverts back to previous format (1 Viewer)

Bobp3114

Member
Local time
Tomorrow, 10:36
Joined
Nov 11, 2020
Messages
77
Customer asks for the dates on the forms to be in Medium format instead of short format.
I have changed to this in the tables used and on each of the forms controls
The tables look as expected
When I change the a date on the form it reverts back to the short format??????
What have i missed?
 
add also the Format (Property) of the data textbox in design view.
 
I think the OP means whilst editing the date by the user typing it in. If that is the case, then also look at applying an input mask - the format property only applies to presentation and hides the actual underlying value
 
It never helps that Microsoft uses Date format (MDY) that is only used by about 3% of the world's population. 😏
 
the OP can "hard" set the format by going to control panel and change the Loale date setting.
 
the OP can "hard" set the format by going to control panel and change the Loale date setting.
Absolutely agree as with the other stricture about setting the format everywhere used(forms, reports controls etc) but there are still anomalies caused by MS's default - for instance assigning a date to a string to be used in an SQL statement.

Being a Brit I always assign dates to strings as Format(date,"dd/MMM/yyyy") to avoid ambiguities.
 
you can also use the ISO 8601 standard date format: YYYY-MM-DD.
 
It never helps that Microsoft uses Date format (MDY) that is only used by about 3% of the world's population. 😏
SQL date literals are also mm/dd/yyyy. Is it so hard for the world to adapt to the American way when all major software development is done in American English?
 
Last edited:
Date format is not an issue.
the problem are those people, not having guidance as to the Basics of
Ms Access.
It is a good advice to Read the Manual first before you try to Operate.
 
Being a Brit I always assign dates to strings as Format(date,"dd/MMM/yyyy") to avoid ambiguities.

When I was young one of our officers had been a signaller in the Second World War. I recall him telling us that that was the solution adopted by the British and American forces in signals traffic to avoid misinterpretations of dates. I always use the ISO standard of YYYY-MM-DD for date literals.
 
SQL date literals are also mm/dd/yyyy. Is it so hard for the world to adapt to the American way when all major software development is done in American English?
Of course we adapt, (hence my usage above) but it is annoying that the other 90+ % of us have to because of American language imperialism.
 
Of course we adapt, (hence my usage above) but it is annoying that the other 90+ % of us have to because of American language imperialism.

Well someone had to set the standard, like ANSI SQL. Perhaps DMY would've been the standard if IBM, the creator of SQL, and Microsoft were UK companies, or if the UK's ICL would've beat them to the punch, or if the UK would've won the war of 1812.
 
Well someone had to set the standard, like ANSI SQL.
The US short date format is not a standard per se. Date literals can be any internationally unambiguous format, as well as mm/dd/yyyy. The ISO standard is YYYY-MM-DD. It would have made sense if this had been made the only acceptable format for date literals.
 
and on each of the forms controls :unsure:

In my opinion the problem is that the behaviour of all controls are based on the type of the field, or, in the way the data is stored. But Usercontrols are more than that: the way a user wants to influence the control.
That is why MS added BeforeUpdate and AfterUpdate events, input formats, and all kind of other stuff to let the form-controls behave as was intended by the user. Or added extra's to the tables. This all make forms as regards content dependant on the user's demands or wishes, and thus very static, and thus not shareable. EACH form-control must be tuned again to the demands/whishes of the user. Moreover, you need (commercial) software to find where MS did hide all the information regarding the Usercontrols.
Some kind generalization is possible with classes of forms or classes of controls, but quite complicated.

When a form is completely independant of user-effects, you have all flexibility you need. Then for example, each user can see "dates" in his preferred format and language, independant on which form the date-control is placed, whereas an other user working the same time with the same records, can enjoy his format and language.
This can be achieved not only per form, but per application, and even over all applications.
 

Users who are viewing this thread

Back
Top Bottom