Hi Richard, for your "European customer" could you teach the following issue while import data: date : EU format for date is dd/mm/yyyy instead of mm/dd/yyyy. When we import date (like we have in that sample) we have problem to convert
Number with decimal: Some EU country use comma (",") instead of dot (".") to separate the decimals. When we import this kind of data we have problem
thanks
Reply from Richard Rost:
I'll be completely honest, I don't have a lot of experience working with Access in foreign country configurations. However, I believe that if someone enters a date on a computer in England, for example, where they have dd/mm/yyyy set up as their format, Access stores that value as a PROPER date/time. So if you send that Access database file to someone in the US, the dates should STILL appear correct because his computer's format is set to mm/dd/yyyy and these are DATES. Remember, the format of the date is set in WINDOWS in the Regional Settings.
The problem occurs when you import data that's stored in a TEXT FILE or some other non-Access (or non-Excel) file. When you pull that in to Access as text, now you have to do some massaging to get the digits in the right place. I've already showed you how to manipulate data like this using the STRING functions (left, right, mid) in Access Expert 25. If you've got:
31/01/2005
And you need to convert that over to the US format, you'd say:
As long as all of your values are in exactly the same format, this will work. Now you can wrap that in a CDate() function (which I just covered in Access Expert 26) to convert that to a real Date value.
Now create an UPDATE QUERY to copy all of these over into a new field (D2 for example) and then you can delete the original field once you've made sure it all copied over correctly.
Replacing commas with decimal places is just a simple matter of using the REPLACE function.
S = Replace(S,",",".")
This will replace all of the commas with periods in the string S.
Hope this helps.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 23.