Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Using excel 2003.
Have column with date-time values. I have column formatting: "m/d/yyyy hh:mm:ss.000". Typical column displays "1/1/3018 00:12:03.930" in the cell and displays "1/1/3018 12:12:04 AM" in formula bar. When I try to get the formatted value for the cell in a macro using this code: Format(Worksheets("Sheet1").Cells(llCurrentRow, 14).Value, "m/d/yyyy hh:mm:ss.000") I'm getting "1/1/3018 00:12:04.000" as my result. If I change my macro code to use format "m/d/yyyy hh:mm:ss.sss" then I get "1/1/3018 00:12:04.044" for my result. But what I really want is the value I see looking at the spreadsheet cell "1/1/3018 00:12:03.930". Alternatively, I've tried to copy the cell's formatted value to another cell, but I haven't figured out how to do that either. Any help appreciated. TIA. Susan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
date & time | Excel Discussion (Misc queries) | |||
conditional formatting with time values | Excel Discussion (Misc queries) | |||
Calculating Time Values in Excel | Excel Worksheet Functions | |||
how do I format cells to change date and time to just date | Excel Discussion (Misc queries) | |||
Date and Time Macro | Excel Discussion (Misc queries) |