Forum Home
Press F1
 
Thread ID: 22576 2002-07-25 00:57:00 MS Excel, entering current Time into a cell. John W (523) Press F1
Post ID Timestamp Content User
65026 2002-07-25 00:57:00 Hello there.

Im having trouble enterig the current Time into a cell, and getting just that without the date as well.

Ive tried =Today()
Ive tried =Now()

=Time() doesnt eem to work

All come up with Date & Time.

This is for a Timecard Macro, to allow calculations of hours worked on a particular job for that day, but no spanned over several days.

Thanks in anticipation.....John.
John W (523)
65027 2002-07-25 01:08:00 Try =TEXT(NOW(),"hh:mm:ss") parry (27)
65028 2002-07-25 03:11:00 If you want to write it into a macro you can use this

Sub Macro1()
ActiveCell.FormulaR1C1 = "=NOW()"
Selection.NumberFormat = "h:mm:ss"
End Sub

Capt Jimbo
Capt Jimbo (17)
65029 2002-07-25 09:39:00 Thanks to all

I solved the problem, by formating the result in HH . mm, irrespective of Today or Time comand . Once this was done, the calculations went just fine .

Thanks again . . . . . . . John .
John W (523)
1