View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default convert a text date to a true date

I only discovered this a couple of days ago when a poster from the US
sent me a file to look at and all his dates came up as #VALUE, so I
had to change his formulae from DATEVALUE to DATE before I could look
into the problem he had asked me to look at - so, it was fresh in my
mind!!

We normally enter dates here as day first followed by month and then
year, so 3 March or 3 March 2007 are recognised, but March 3 2007 or
March 3, 2007 are not, and are treated as strings.

So, you learn something new every day <bg

Pete

On Nov 15, 4:32 am, "Rick Rothstein \(MVP - VB\)"
wrote:
this doesn't work in the UK, as


March 3, 2002


is not a valid date string. I'll post my solution direct to the OP.


Really? I have no experience with international units, but I figured the
Excel date engine would work the same as the VB/VBA date engine... if the
date engine could interpret something as a date in **any** possible way,
then that is how it interprets it. I'm guessing, based on your posting, that
for the Excel spreadsheet world, this is not the case. Thanks for letting me
know.

Rick