MaxDate
Details
- MaxDate[dates] accepts dates in all standard date notations, including DateObject, DateInterval, DateList, AbsoluteTime and DateString formats.
- For lists of dates, MaxDate returns dates in the same form in which they were given. For TemporalData and Databin, DateObject expressions are returned.
- MaxDate[tseries] works on all forms of TemporalData, including TimeSeries and EventSeries.
Examples
open all close allBasic Examples (4)
Find the last date in a list of date objects:
MaxDate[{DateObject[{2022, 4, 8}, "Day"], DateObject[{2022, 4, 9}, "Day"], DateObject[{2022, 4, 7}, "Day"]}]Find the last date in a list of dates in different forms:
MaxDate[{DateObject[{2020}], "1950 Jan 4th", 3867285330, {2022, 1, 1}}]Get the instant representing the endpoint of a date interval:
MaxDate[DateInterval[Yesterday]]Find the final day within the interval representing September:
MaxDate[DateInterval[DateObject[{2025, 9}, "Month"]], "Day"]Scope (2)
Find the final timestamp of a TimeSeries object:
ts = EarthquakeData[All, 8, {{2017, 1, 1}, {2020, 5, 16}}, "Magnitude"]MaxDate[ts]Find the final timestamp in a Databin object:
bin = Databin["1qGFQ8v"]DateBounds[bin]Properties & Relations (2)
MaxDate[data] is equivalent to the last element of DateBounds[data]:
dates = {DateObject[{2022, 4, 8}, "Day"], DateObject[{2022, 4, 9}, "Day"], DateObject[{2022, 4, 7}, "Day"]};MaxDate[dates]DateBounds[dates]MinDate[data] returns the earliest date in data and MaxDate[data] returns the latest date:
dates = {DateObject[{2022, 4, 8}, "Day"], DateObject[{2022, 4, 9}, "Day"], DateObject[{2022, 4, 7}, "Day"]};MinDate[dates]MaxDate[dates]Related Guides
History
Text
Wolfram Research (2020), MaxDate, Wolfram Language function, https://reference.wolfram.com/language/ref/MaxDate.html.
CMS
Wolfram Language. 2020. "MaxDate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MaxDate.html.
APA
Wolfram Language. (2020). MaxDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MaxDate.html
BibTeX
@misc{reference.wolfram_2026_maxdate, author="Wolfram Research", title="{MaxDate}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/MaxDate.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_maxdate, organization={Wolfram Research}, title={MaxDate}, year={2020}, url={https://reference.wolfram.com/language/ref/MaxDate.html}, note=[Accessed: 13-June-2026]}