NOW() with a fixed date?

Discuss the spreadsheet application

NOW() with a fixed date?

Postby nownownow » Wed Mar 16, 2016 8:54 am

How can I avoid NOW() fields being recalculated to the current date every time?
I want to enter the current timestamp once and it should stay fixed forever.
The only "solutions" I found were for OO 2.x and involved messing around with macros, which is just ridiculous.
Is there an easy way to solve this in OO 4.x?
OpenOffice 4.1.2 / Gentoo AMD64
nownownow
 
Posts: 1
Joined: Wed Mar 16, 2016 8:49 am

Re: NOW() with a fixed date?

Postby karolus » Wed Mar 16, 2016 10:00 am

Hallo

Type: =now() … <F9> … <enter> … <enter>

Karolus
AOO4, Libreoffice - 5.1 … 5.3.2.2 on Linux Mint17
User avatar
karolus
Volunteer
 
Posts: 852
Joined: Sat Jul 02, 2011 9:47 am

Re: NOW() with a fixed date?

Postby Zizi64 » Wed Mar 16, 2016 10:57 am

https://forum.openoffice.org/en/forum/v ... =9&t=35236

...Or you can type-in the actual date-time value manually... :)

But the most efficient way to create a macro, what will insert the actual date-time value into the selected (active) cell.

For beginners - with the macrorecorder:
https://scito.ch/content/insert-current ... ffice-calc



If you can use the API functions:

Code: Select all   Expand viewCollapse view
Sub Timestamp

   oCell = ThisComponent.getCurrentSelection()
   oCell.setValue(DateValue(Now)+TimeValue(Now))
end sub


an example file:
Timestamp.ods
(11.59 KiB) Downloaded 89 times
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8492
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: NOW() with a fixed date?

Postby acknak » Wed Mar 16, 2016 2:03 pm

If this function is important for you, you may want to try Libreoffice: it comes with this feature built-in and configured with a shortcut key.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: NOW() with a fixed date?

Postby Zizi64 » Wed Mar 16, 2016 2:20 pm

Libreoffice: it comes with this feature built-in and configured with a shortcut key.


Do you mean the 'fixed Date-Time fields' function of the LO? How you can insert them in a Calc cell?
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8492
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: NOW() with a fixed date?

Postby karolus » Wed Mar 16, 2016 2:31 pm

Zizi64 wrote:
Libreoffice: it comes with this feature built-in and configured with a shortcut key.


Do you mean the 'fixed Date-Time fields' function of the LO? How you can insert them in a Calc cell?

No, its only 2 predefined Entries for →Tools→Customize→Keyboard…→→insert→[current_Time|current_Date]
AOO4, Libreoffice - 5.1 … 5.3.2.2 on Linux Mint17
User avatar
karolus
Volunteer
 
Posts: 852
Joined: Sat Jul 02, 2011 9:47 am

Re: NOW() with a fixed date?

Postby Villeroy » Wed Mar 16, 2016 2:41 pm

karolus wrote:
Zizi64 wrote:
Libreoffice: it comes with this feature built-in and configured with a shortcut key.


Do you mean the 'fixed Date-Time fields' function of the LO? How you can insert them in a Calc cell?

No, its only 2 predefined Entries for →Tools→Customize→Keyboard…→→insert→[current_Time|current_Date]

Wow. It can insert either the time or the date or a date text field borrowed from the Writer component. But it can not insert a time stamp (date + time) which is what virtually everybody wants.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27313
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: NOW() with a fixed date?

Postby Zizi64 » Wed Mar 16, 2016 2:46 pm

Ahh yes, I see now: In the HUN version of the LibreOffice there are two predefined shortcut keys for the date and the time.

Ctrl-. (dot) → Date (formatted: "YYYY-MM-DD")
Shift-Ctrl-. → Time (formatted: "HH:MM:SS")


I do not remember these functions. Thank you for the information!
Tibor Kovacs, Hungary; LO6.1.6 on Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.3.3; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8492
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to Calc

Who is online

Users browsing this forum: No registered users and 28 guests