View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1813_] Rick Rothstein \(MVP - VB\)[_1813_] is offline
external usenet poster
 
Posts: 1
Default Extract time for comparison

Another alternative would be...

=NOW()-TODAY()

Rick


"Dave Peterson" wrote in message
...
=now() includes both the date and time.

Maybe you could use:
=mod(now(),1)
(formatted as time)
to get the time (without the date).

Steven wrote:

How do you extract the time from a cell that has the function now() in
it.
For example I have a cell in a worksheet that might be hardcoded with the
time 14:30 and then I want to take the current time of the day and see if
it
is greater than 14:30. The problem I am having is that using the now()
function even if the time is 12:00 today then it will still think it is
greater than 14:30 which is incorrect when just comparing the time.

Thank you,

Steven


--

Dave Peterson