troubleshooting Question

Function datetime on differents contry like brazil and EUA

Avatar of rafaelrgl
rafaelrgl asked on
Delphi
18 Comments2 Solutions397 ViewsLast Modified:
hi experts, i have a huge problem trying to make a solution for this one, so Here in EUA the date come month first then the day, but in brazil the day comes first then the month, like this:

brazil :  22/10/1985 20:15:22 pm
eua    : 10/22/1985 20:15:22  pm

so, my problem is when the regional and language option on painel control is Portuguese(brazil) my program give allways a error converting data to english format, here is the command that i'm using:

FormatDateTime('dd/MM/yyyy hh:nn:ss AM/PM',now())

for my understand, when I put now() then comes a brazilian format, when it trys to converto to english format, then the error shows up. Is there anyway to put only english date format on my program????
ASKER CERTIFIED SOLUTION
MerijnB
Sr. Software Engineer

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 18 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 18 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