English
Ask Your Question
0

Static now() function for a log.

asked 2014-02-10 18:29:39 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm creating a log that needs a time-stamp on each line as the line is created. I tried the now() function which puts a time-stamp on the line created, however, the time-stamps of all other lines are updated to the current now() time of the new line when a new line is created.

Need a "static now()" function that updates only on creation.

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted
1

answered 2014-02-21 13:29:57 +0100

Jens S gravatar image

If you want your time-stamp in col A - format col A as DD-MM-YY HH:MM (or what is suitable in your language) Put this formula in A1: =IF(B1="";"";IF(A1="";NOW();A1)) and copy down. Under Menu:Tools - Options - LibreOffice Calc - Calculate mark Iterations (this is only saved in current document) Each time you add something in col B the time-stamp will show up in col A

Jens

edit flag offensive delete link more

Comments

Jens answer gives an error notice, not the NOW() result. Getting the NOW() result in column A as a result of a condition in column B is not difficult. A simple IF() functions does nicely. The problem is, the NOW() result is not static. That is, for example, if a row in Column A should receive the result of NOW() as a condition of the presence of a row entry in column B, the result is indeed the value of NOW(). Good enough so far. HOWEVER, subsequent rows when they are entered change the value of ALL the previous entries in column A to the value of the newest NOW() result. A new line entry causes ALL NOW() results to ...(more)

HamMan ( 2014-02-24 02:51:18 +0100 )edit
0

answered 2014-02-21 11:14:02 +0100

HamMan gravatar image

Thank you for that answer. I was unaware of that CTR;-SHIFT-; shortcut.

I should have been a bit more specific as to the function needed. It would be time-saving in a fast moving environment to have a time stamp in a cell upon certain text being entered into an adjacent cell. Thus, as the log becomes filled in with text, each line is stamped with the current time automatically with no other interaction. The now() function would be perfect if there were an option to have it only update upon first line creation. As it is, using an if() function, I can get the now() function to work; however, when subsequent lines are entered ALL of the previous time-stamps are updated to reflect the time of the last created line. It won't work.

Is there a way to use the CTRL-SHIFT-; shortcut in an expression such as =if(b2>0,CTRL-SHIFT-;,"") ?

edit flag offensive delete link more
0

answered 2014-02-10 22:12:09 +0100

mariosv gravatar image

Hi @HamMan, there are shorcuts for it [Ctrl]+[;] or [Ctrl]+[Shift]+[;], but I have changed it because with a Spanish keyboard [;] is a shift character and the shortcut doesn't works.
You can change it in: Menu/Tools/Customize - Keyboard.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-02-10 18:29:39 +0100

Seen: 102 times

Last updated: Feb 21