Link to home
Start Free TrialLog in
Avatar of Frank Freese
Frank FreeseFlag for United States of America

asked on

Substract 1 day from date()

Experts,
I would like to subtract 1 day from date()
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oops, got the arguments wrong:

 =DateAdd("d",-1,Now())

  Date/Time fields are also simply a double float with the whole number portion represneting the date, so you could also do:

  =Now() - 1

  But I would use DateAdd() for a number of reasons; it's clearer what's going on, works with every type of period (days, weeks, years, etc) and takes care of the time as well.

JimD.
Avatar of Frank Freese

ASKER

thanks...killed 2 birds with one stone.