PreviousDate
✖
PreviousDate
gives the previous date of the given granularity relative to the specified date.
Details and Options

- PreviousDate[gran] returns a DateObject expression.
- In PreviousDate[gran], the granularity type gran can be any of the following:
-
"Millennium" 1000-year period beginning with year XX00 "MillenniumBeginning01" 1000-year period beginning with year XX01 "Century" 100-year period beginning with year XX00 "CenturyBeginning01" 100-year period beginning with year XX01 "Decade" 10-year period including the date "Year" year including the date "Quarter" 3-month quarter including the date "Month" month including the date "Week" week beginning Monday including the date "WeekBeginningSunday" week beginning Sunday including the date "Day" day including the date "Hour" hour including the date "Minute" minute including the date "Second" second including the date - In PreviousDate[daytype], the day type specification daytype can be any of the following: "Weekday", "WeekendDay", Monday through Sunday, "MonthFirstDay", "MonthLastDay" and "BusinessDay".
- The following options can be given:
-
CalendarType Automatic calendar system for the result TimeZone $TimeZone time zone for the result
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Get a date object representing the previous month:

https://wolfram.com/xid/0rszulm3o-cm55x1

Get the date object for the previous hour:

https://wolfram.com/xid/0rszulm3o-jrt46h

Get the week before a given date:

https://wolfram.com/xid/0rszulm3o-it397r

Find the day before the fall of Saigon:

https://wolfram.com/xid/0rszulm3o-e7685g


https://wolfram.com/xid/0rszulm3o-z1okf

Find the Sunday before the day of independence in Ghana:

https://wolfram.com/xid/0rszulm3o-qoai7g

Scope (1)Survey of the scope of standard use cases
Date specifications may be a DateObject, DateList or DateString:

https://wolfram.com/xid/0rszulm3o-eqbqo


https://wolfram.com/xid/0rszulm3o-ege62p


https://wolfram.com/xid/0rszulm3o-bueib6

Options (2)Common values & functionality for each option
Properties & Relations (1)Properties of the function, and connections to other functions
Yesterday is equivalent to PreviousDate["Day"]:

https://wolfram.com/xid/0rszulm3o-dhiw44

Wolfram Research (2017), PreviousDate, Wolfram Language function, https://reference.wolfram.com/language/ref/PreviousDate.html (updated 2019).
Text
Wolfram Research (2017), PreviousDate, Wolfram Language function, https://reference.wolfram.com/language/ref/PreviousDate.html (updated 2019).
Wolfram Research (2017), PreviousDate, Wolfram Language function, https://reference.wolfram.com/language/ref/PreviousDate.html (updated 2019).
CMS
Wolfram Language. 2017. "PreviousDate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/PreviousDate.html.
Wolfram Language. 2017. "PreviousDate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/PreviousDate.html.
APA
Wolfram Language. (2017). PreviousDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PreviousDate.html
Wolfram Language. (2017). PreviousDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PreviousDate.html
BibTeX
@misc{reference.wolfram_2025_previousdate, author="Wolfram Research", title="{PreviousDate}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/PreviousDate.html}", note=[Accessed: 21-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_previousdate, organization={Wolfram Research}, title={PreviousDate}, year={2019}, url={https://reference.wolfram.com/language/ref/PreviousDate.html}, note=[Accessed: 21-March-2025
]}