Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following bit of code below that for some reason when run a
message box displays 01/02/2005 as it should but when the value is placed in a cell it changes to 02/01/2005. I have tried this with month 03, 04 etc and still the same. I have tried formatting the cell before hand and even afterwards it thinks its 2nd Jan 2005 rather than 1st Feb 2005 (British region). Any ideas anyone??? Thanks MC --------------------------- Sub WRITEDATE() Dim dateandtime As String dateandtime = "01/02/2005 08:35" date1 = Left(dateandtime, 10) MsgBox date1 'to test Cells(1, 1) = date1 'have tried cells(1,1).value=date1 but same results End Sub --------------------- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Format Problem | Excel Discussion (Misc queries) | |||
Excel Format Problem - Date Overrides Format | Excel Discussion (Misc queries) | |||
Problem with Date format | Excel Discussion (Misc queries) | |||
date format problem?? | Excel Discussion (Misc queries) | |||
Date format problem | Excel Worksheet Functions |