NOW AND TODAY

  • Thread starter Thread starter THill
  • Start date Start date
T

THill

Is ther anyway to combine the now and today fuctions in a logic formula?
Somehting like....
if it from 7am to 11:59pm then display today and if it between 12am and 7am
display yesterdays date

Any help would be greatly appreciated

Thank You
 
Put a time in A1 and in B1 enter:

=IF(A1>0.2916666666,TODAY(),TODAY()-1) and format as a date
 
Try this:

=IF(MOD(NOW(),1)>=7/24,TODAY(),TODAY()-1)

Hope this helps.

Pete
 
If it's just for display purposes

=NOW()-7/24

format as date

If you want the underlying value to be a date only, add an INT function, i.e.

=INT(NOW()-7/24)
 
Even better!

--
Biff
Microsoft Excel MVP


daddylonglegs said:
If it's just for display purposes

=NOW()-7/24

format as date

If you want the underlying value to be a date only, add an INT function,
i.e.

=INT(NOW()-7/24)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top