Coding & Programming > JavaScript Forum

Insert current time



I wrote a script to insert the current time on a field depending on another field

for example if my field "start" = "Now" then my field "pick_start_time" should get the current time

what my script is doing when "start" = "Now" I get redirected to a blank page with the time on it
not sure how to get the time on my "pick_start_time" field

here is what I have so far

--- Code: ---Only registered users can see contents. Please click here to

A static value in a worksheet is one that doesn’t change when the worksheet is recalculated or opened. When you press a key combination such as Ctrl+; to insert the current date in a cell, Excel “takes a snapshot” of the current date and then inserts the date in the cell. Because that cell’s value doesn’t change, it’s considered static.

To insert the current time, press Ctrl+Shift+; (semi-colon). To insert the current date and time, press Ctrl+; (semi-colon), then press Space, and then press Ctrl+Shift+; (semi-colon).
=TODAY(): Current date (varies)
=NOW(): Current date and time (varies)


[0] Message Index

Go to full version