troubleshooting Question

Best way to handle date on different PCs...

Avatar of Boon01
Boon01 asked on
Programming.NET ProgrammingVisual Basic.NET
11 Comments2 Solutions211 ViewsLast Modified:
I am running VB.Net writing/reading to an Access 2003 database.

Alright, being new to programming I have come to the realization that I dont like Dates in any form or fashion. I thought I had it all figured out and was validating/saving/retrieving date just fine. And then I installed my compiled program on a clean PC and found a huge problem.

On my PC (and my test PC) I have my short date set to MM/DD/YYYY. And life is good and everything flows. We installed this on a different PC that had the short date set to M/D/YY and everything went down hill really fast. With error messages, invalid format errors etc.

I am saving my data with a masked text box and validating that it is in MM/DD/YYYY format when I save. But if someone has a PC with the date setting that is different then it reads it fine but it displays it in M/D/YY format. So my mask/validation has a real problem with this.

Can anyone tell me the best way to handle the different date formats from one PC to another? I dont really want to tell everyone that they have to change their date setting to conform to what my program is looking for. I am sure that I am not the first person to come across this.

Thanks for any input/help that you can give.
Dirk Haest
Project manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros