Dates Being displayed the wrong way around.

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

NateBuckley

Hello, Everyone.

I'm having more problems with dates, I'm reading in dates from a
Spreadsheet, and it's swtiching the day and the month around

so the format should be DD/MM/YY (If the order appears Alien it's because
i'm from from the UK )

In my spreadsheet I have 01/05/08

when I read it into the msgBox it displays as 05/01/08

The following code snippit is to show you how I do it.

MsgBox sht.Cells(i, 6).Value

sht is a variant I SET to Sheets("HOLData").
 
Here are some formatting features you might find useful....

Mark Ivey

Note: you can replace the "Range("A1")" with the cell reference you were
using if you prefer



MsgBox Range("A1").Value

MsgBox Format(Range("A1").Value, "MM/DD/YY")
MsgBox Format(Range("A1").Value, "DD/MM/YY")
MsgBox Format(Range("A1").Value, "DDD MM/DD/YYYY")
MsgBox Format(Range("A1").Value, "DDD MMM DD YYYY")
MsgBox Format(Range("A1").Value, "DDD MMMM DD YYYY")
 
Cheers, for some reason a restart fixed the problem :S weird, but I
appreciate the list of different Formats you presented. I shall give them a
whirl.

Thanks again!
 

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