I want to fill a cell with the current time, so it changes every time I open the file.
I currently use the now() function for that, but it returns both the date and the time.
I want to see only the time. Is there a way to do that?
9 Answers
After you entered the formual =now() to the cell, select the cell and press Ctrl + Shift + 2 You're welcome!
2try this formula
=NOW()-TRUNC(NOW())
=NOW()-TODAY() 9 =Now()- Right Click on
Cell - Click
Format Cells - Click on
Customon left side - Select the time format as
h:mm:ss AM/PM - Click
OK
One more Solution:-
=TEXT(NOW(), "hh:mm:ss AM/PM") 6 You could try the following:
TIME(VALUE(LEFT(TEXT(NOW(), "HH:MM:SS"), 2)), VALUE(LEFT(RIGHT(TEXT(NOW(), "HH:MM:SS"), 5), 2)), VALUE(RIGHT(TEXT(NOW(), "SS:MM:SS"), 2)))
This will effectively break up the hours, minutes and seconds returned from the format function and format them as a time. I haven't tried it in the afternoon, so I'm not sure if you get problems with am/pm.
1Try this code:
=TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))Thanks.
To just show the time you would hold --> CTRL + : <-- this will display the time only.
1Use
=NOW()-TODAY(),If you want to use it in a formula like "end time" - "current time" to find "total hours" then just format the "total hours" cell to number and multiply the whole formula by 24 like this
Current Time Finish Time Total Hours
=NOW()-TODAY() 8:30 PM =(B2-B1)*24 here is a link showing how to do thisCLOCK WITH AUTOMATIC REFRESH
in line With Sheet1.Range("A1") replace Sheet1 with actual sheet name where you want this clock and A1 with cell where you want your clock
1There's a built in function for this, to only provide the time. The function is =Time(). This keeps it from displaying the date, and will only display the current time of the OS upon the creation of a new entry.
1