Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Expert > X23 > < X22 | X24 >
Back to Access Expert 23    Comments List
Upload Images   @Reply   Bookmark    Link   Email  
Converting European Dates Currency
michele finizio 
    
11 years ago
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:

USDate: Mid(D,4,2) & "/" & Left(D,2) & "/" & Right(D,4)

This will give you:

01/31/2005

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.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Expert 23.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/22/2025 9:15:20 PM. PLT: 1s