Link to home
Start Free TrialLog in
Avatar of zimmer9
zimmer9Flag for United States of America

asked on

How to display an Access 2003 date field in the date format mm/dd/yyyy for a user in India ?

I have a user in India who executes an Access 2003 mdb type file application.

I see a date field on the Access interface for the following field layout as 4/28/2014.

                                  Field Name     Data Type    Format
                                  ---------------   -------------   ----------
The field is defined as dtImport        Date/Time    mm/dd/yyyy

The user in India sees this date field as 28/04/2014.

Is there a way to change his settings to display this date field as 4/28/2014 without changing the VBA code?
Avatar of COACHMAN99
COACHMAN99

set the control source property to = format (dtImport,"mm/dd/yyyy")
(or change the machine regional date/time settings format
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I did not request confirmation of the accepted answer (although it is purely a 'long form' of mine).
I requested if it was possible to ask Pat Hartman to wait a few hours for the author to respond before jumping in and expanding on a prior answer before more information or clarity is requested.
It is discouraging to participants of this forum when someone else is so desperate to be heard that they embellish a previous answer, without waiting to see if it is acceptable as-is.
Sometimes people want a concise tip, rather than the full text.
I "embellished" because I believe your answer is not what the OP is looking for.  Your suggestion would make the control unbound and therefore not updateable.  While that may be acceptable in this case, it is generally not the correct solution and people will be seeing this "solution" years from now.  Using the Format property of the control achieves the same result and does not impact the way the control operates.

As to the second suggestion to change the Windows setting.  That is really a last resort since it impacts EVERY OTHER APPLICATION THAT RUNS ON THE MACHINE if they respect the Windows date setting!   Therefore, unless the setting is actually wrong, which is quite unlikely, I would NOT change it.

My third option was to change the date format to spell out the month name -- 13-May-2014.  So, even though that is not the preferred date setting for either country, at least it is one that both will be able to understand.  

I don't know what the situation is.  Perhaps the OP doesn't realize that India probably uses the UK date format rather than the US format and there is no problem at all which I alluded to by asking why he wanted to confuse the issue with a non-standard (for India) date format.