View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Different Date formats in text to be recognised as date value

Read Gary''s Student's reply again... how will you know which format a date
like 3/7/2009 was originally in (D/M/YYYY or M/D/YYYY)?

--
Rick (MVP - Excel)


"swiftcode" wrote in message
...
Hi Gary and Joel,

Thanks.

You are both right. This is a problem for me when people from different
countries send me information using their preferred formats, as i need the
information in date value and in British format.

On the part regarding more information, usually when people send me their
data, i assume that it is eithier American or British, so if it is
"DD\MM\YYYY" or "D\M\YYYY" i will take it as British and if it is
"MM\DD\YYYY" or "M\D\YYYY" as American.

Would you fellas be able to help me on this?

Thank you.

Rgds
Ray



"Gary''s Student" wrote:

You need more information. For example 3\7\2009 might mean
March 7 2009 in format #6
or
July 3 2009 in format #3


--
Gary''s Student - gsnu200907


"swiftcode" wrote:

Hi all,

I have a problem with some date formats where people send to me in
various
forms (text format)
1) "DD\MM\YYYY"
2) "D\MM\YYYY"
3) "D\M\YYYY"
4) "MM\DD\YYYY"
5) "MM\D\YYYY"
6) "M\D\YYYY"

Is there anyway to be able to convert these to date values and be
reflected
as "DD\MM\YYY" using vba.

Thank you for any help rendered in advance.

Rgds
Ray