Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anyone know why my short date formatting comes up in US format, if the
day is less than 13. My regional setting are UK only and dd/MM/yyyy. The long date settings are fine (sample code that I have been using is below) Many thanks James Sub testdate() Cells(1, 1).Value = Now - 2 ' gives correct date and time (10th of February) Cells(2, 1).Value = Format(Now - 2, "Long date") ' gives correct date (10th of February) Cells(3, 1).Value = Format(Now - 2, "D/MMM/YYYY") ' gives correct date(10th of February) Cells(4, 1).Value = Format(Now - 2, "Short date") ' gives wrong date (2nd of October) Cells(5, 1).Value = Format(Now - 2, "dd/mm/YYYY") ' gives wrong date (2nd of October) Cells(6, 1).Value = Format(Now - 2, "dd/mm/YYYY") ' gives wrong date (2nd of October) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
format cell for keyboard short cut entry only? | Excel Worksheet Functions | |||
Storing data in Short Date format | New Users to Excel | |||
Large format prints cut short | Excel Discussion (Misc queries) | |||
dates in pivot not coming up with years | Excel Programming | |||
emailed docs coming back in different format | Excel Discussion (Misc queries) |