Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
Oh Wise Ones,
We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY") "Mike K" wrote: Oh Wise Ones, We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
instead of =Date, see if =Now() works for you.
-- -John Please rate when your question is answered to help us and others know what is helpful. "Mike K" wrote: Oh Wise Ones, We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
Actually you need
with range("J4") .value = now() .numberformat="MM/DD/YYYY" end with "Sam Wilson" wrote: Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY") "Mike K" wrote: Oh Wise Ones, We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
Mike k,
= Format(Date, "ddddd") & " " & Format(Time, "ttttt") "Mike K" wrote: Oh Wise Ones, We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
Sam,
Pardon my ignorance but how do I place this to refer to the proper sheet? The previous line is: Worksheets("Red Tag").Range("H20,H46") = Date which is ok, but then I need to refer to another sheet Worksheets("Open Red Tags").Range ("J4")= Date and replace it with this: Worksheets ("Open Red Tags") With Range("J4") .Value = Now() .NumberFormat = "MM/DD/YYYY" End With I get an invalid use of property error. Mike "Sam Wilson" wrote: Actually you need with range("J4") .value = now() .numberformat="MM/DD/YYYY" end with "Sam Wilson" wrote: Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY") "Mike K" wrote: Oh Wise Ones, We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
Sorry, use this: With worksheets("Open Red Tags").Range("J4") .Value = Now() .NumberFormat = "MM/DD/YYYY" End With "Mike K" wrote: Sam, Pardon my ignorance but how do I place this to refer to the proper sheet? The previous line is: Worksheets("Red Tag").Range("H20,H46") = Date which is ok, but then I need to refer to another sheet Worksheets("Open Red Tags").Range ("J4")= Date and replace it with this: Worksheets ("Open Red Tags") With Range("J4") .Value = Now() .NumberFormat = "MM/DD/YYYY" End With I get an invalid use of property error. Mike "Sam Wilson" wrote: Actually you need with range("J4") .value = now() .numberformat="MM/DD/YYYY" end with "Sam Wilson" wrote: Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY") "Mike K" wrote: Oh Wise Ones, We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing time with date
Beautiful!!
Thanks Sam "Sam Wilson" wrote: Sorry, use this: With worksheets("Open Red Tags").Range("J4") .Value = Now() .NumberFormat = "MM/DD/YYYY" End With "Mike K" wrote: Sam, Pardon my ignorance but how do I place this to refer to the proper sheet? The previous line is: Worksheets("Red Tag").Range("H20,H46") = Date which is ok, but then I need to refer to another sheet Worksheets("Open Red Tags").Range ("J4")= Date and replace it with this: Worksheets ("Open Red Tags") With Range("J4") .Value = Now() .NumberFormat = "MM/DD/YYYY" End With I get an invalid use of property error. Mike "Sam Wilson" wrote: Actually you need with range("J4") .value = now() .numberformat="MM/DD/YYYY" end with "Sam Wilson" wrote: Worksheets("Open Red Tags").Range("J4")=format(now(),"MM/DD/YYYY") "Mike K" wrote: Oh Wise Ones, We have a disposition file that records a date the entry was made among other things. I would like to add the time to that stamp. I know this is simple for you programmers but I need help with the syntax. Current code: Worksheets("Open Red Tags").Range("J4") = Date I would like to add the date AND time to J4, but preferably keep the formatting to display only the date (M/D/YYYY) . Could someone please help? Thanks, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting text format of time/date into Excel time/date for subtr | Excel Worksheet Functions | |||
Calculating date and placing the value in the right date range col | Excel Discussion (Misc queries) | |||
Calculating days & time left from start date/time to end date/time | Excel Worksheet Functions | |||
Combined date time cell to separate date & time components | Excel Discussion (Misc queries) | |||
Combined date time cell to separate date & time components | Excel Worksheet Functions |