Time calculation with now()

  • Thread starter Thread starter dfeder
  • Start date Start date
D

dfeder

I am trying to create a train schedule that compares the departing time
of the train with the system time. I've tried subtracting the column
containing the time a train departs from the now() column (which I
thought read the system time) from but the times I receive do not make
sense. Any suggestions would be greatly appreciated.

Thank you.
 
I am trying to create a train schedule that compares the departing time
of the train with the system time. I've tried subtracting the column
containing the time a train departs from the now() column (which I
thought read the system time) from but the times I receive do not make
sense. Any suggestions would be greatly appreciated.

Format the cell with the departure time to include the date
and see what it says. Is it sometime about a hundred
years ago?

A time always includes a date whether it's formatted to show
the date or not. If you type 9:00 you see 9:00 but the date is
1/0/1900 (or 1904).

On my system subtracting a time from =now() results in #######
because you can't have negative time but if the date is correct
it works just fine.

Jordon
 
Or...
Maybe F9 will fix the problem. Spreadsheets don't normally
calc themselves unless you make a change to one of the
cells. If you're looking at the time and expect it to change
automatically it won't happen.

Jordon
 
D,

Now() includes the date, which is confounding your calculation, as I suspect
your time is only a time value (fractional part of a day). Try this:

=MOD(NOW(),1)-A2

Keep in mind that Now() is calculated only when the worksheet calculates,
and will get stale if you stare at it for a while without causing a
calculation (or even if you don't). :) If this is to stay current, you'll
need to force a calculation periodically to keep it current. A macro can do
that.
 
Back
Top