Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates Being displayed the wrong way around.
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"). |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates Being displayed the wrong way around.
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") |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates Being displayed the wrong way around.
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! "Mark Ivey" wrote: 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") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 displayed dates | Excel Discussion (Misc queries) | |||
numbers displayed wrong | Excel Discussion (Misc queries) | |||
Wrong number displayed. | Excel Discussion (Misc queries) | |||
negative dates or times are displayed as # # # # | Excel Worksheet Functions | |||
negative dates or times are displayed as # # # # | New Users to Excel |