Re: date/time-stamp function
- From: hala cse unsw edu au (Harald Richard Ashburner)
- To: gnumeric-list gnome org
- Subject: Re: date/time-stamp function
- Date: Mon, 20 Sep 2004 16:48:48 +1000
J.H.M. Dassen (Ray) said:
On Wed, Sep 08, 2004 at 11:38:45 -0400, Adam J. Henry wrote:
Hi. I'm interested in using Gnumeric to record time spent on work
projects. I'm looking for suggests to accomplish the following goals:
A way to find the difference in two date/time stamps.
I'm not aware of a simple function for that, but you should be able to
construct what you want using DATEDIF, DATE, TIME, YEAR, MONTH, HOUR and
MINUTE.
If you are primarily interested in the difference in days, you can just
subtract the values from one another ("Serial Numbers in Gnumeric are
represented as follows:The integral part is the number of days since the 1st
of January of 1900. The decimal part represent the fraction of the day and
is mapped into hour, minutes and seconds.")
A quick way to insert a date/time stamp. This would mark the
current date and time, but would not be changed every time I
reload the spreadsheet (as with the NOW() function).
* =NOW()
* go back to the cell
* CTRL-C
* right-click, select Paste Special -> As Value -> OK.
Sorry for the lateness,
I actually answered this, but my email address changed so it got held for moderation. (My laziness
strikes again - fixed now :)
(Cut & paste from the original)
Ctrl + ; => inserts the current date in a cell
Ctrl + : => inserts the current time in a cell
(both as text)
you can subtract one time from another using = A2-A1 or whatever, then
it's just a question of making sure the result is the correct format.
Format->cells and choose something like [h]:mm:ss
Dates are stored as an integer being the number of days since January 1
1900
Time is stored as a fraction of a day. eg 0 is midnight, 0.5 midday,
0.75 is 6pm
both are displayed as dates, times or both date and time
by selecting
the correct format.
IIRC that is the same as Excel.
Right now, here the current date and time is
38250.3875...
or, formatted as m/dd/y h:mm
9/20/04 9:18
Hope that helps.
--
Kind regards,
Hal Ashburner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]