[Last Call] Learn how to a build a cloud-first strategyRegister Now


Substract 1 day from date()

Posted on 2008-11-13
Medium Priority
Last Modified: 2012-05-05
I would like to subtract 1 day from date()
Question by:Frank Freese
  • 2
LVL 58

Accepted Solution

Jim Dettman (Microsoft MVP/ EE MVE) earned 1000 total points
ID: 22950754

  What you want to use is the DateAdd() function:


LVL 18

Assisted Solution

jmoss111 earned 1000 total points
ID: 22950755
MyDate = Date() -1
LVL 58
ID: 22950783
oops, got the arguments wrong:


  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.


Author Closing Comment

by:Frank Freese
ID: 31516394
thanks...killed 2 birds with one stone.

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question