NOW AND TODAY

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
 
G

Gary''s Student

Put a time in A1 and in B1 enter:

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

daddylonglegs

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)
 
T

T. Valko

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

Top