Solved

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

Posted on 2014-04-28
7
911 Views
Last Modified: 2014-05-13
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?
0
Comment
Question by:zimmer9
  • 2
  • 2
7 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 40027802
set the control source property to = format (dtImport,"mm/dd/yyyy")
(or change the machine regional date/time settings format
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40027903
Access uses the default Windows date setting UNLESS you override it on EVERY control that shows a date.  This doesn't require VBA but it is a property setting and you have to touch every control you want to change.  Or, you can write VBA to update the property for you.

Is dd/mm/yyyy the normal order for India?  If it isn't, he can just change his windows date format.  If it is, why do you want to confuse him with mm/dd/yyyy formatted dates?

When I develop apps for users in different countries, I use the medium date format which is dd-mmm-yyyy or 28-Apr-2014 in this case.
0
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 40060600
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.
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 40062218
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.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Runtime 2010 Error 17 33
how to link subforms ms/access VBA 6 30
Export Query data to excel file 14 39
Format Meeting Request through VBA 5 22
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now