Dates - Days and months switching around

  • Thread starter Thread starter NateBuckley
  • Start date Start date
N

NateBuckley

Hello, I'm building a solution that is heavily dependant on dates, the
problem I'm having is in certain situations it's switching the day and month
around. I'm from the UK so we use dd/mm/yy - where as Americans use mm/dd/yy
so I'm guessing it's somehow reverting to American style in VBA somehow.

It's a little bit confusing as I do lots of date checks and sometimes it'll
work correctly and other, seemingly random times it'll switch around.

I'm just wondering if there is a way to specifically make sure - to force
the little swine - to treat all dates as declared as in my regional settings.

Any help given would be appreciated, otherwise I may have to take a
boomstick to the machine. :)

Nate
 
cast the date

CDate(Mydatevalue)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Cheers Mr.Phillips, I shall kick myself for not thinking of that and also
taking up your time, but thank you for your speedy reply.
 
Being from the UK too, I suffer that VBA 'feature' all the time.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top