MidDate
✖
MidDate
Details and Options


- MidDate gives the date that is midway through a given date or list of dates.
- Possible forms of datespec in MidDate[datespec,…] include:
-
DateObject[…] mid date of a date object of any granularity TimeObject[…] mid time of a time object of any granularity DateInterval[…] mid date of a date interval {d1,d2,…} mid date of a list of dates, times and intervals TimeSeries[…] mid date of the times of a time series EventSeries[…] mid date of the times of an event series TemporalData[…] mid date of the times of temporal data - MidDate[(d1,d2,…}] gives the midpoint instant based on the sum of probability density functions for a uniform distribution of the di dates.
- MidDate takes the following options:
-
CalendarType Automatic calendar for generated date DateFormat Automatic format used to display date DateGranularity Automatic calendar granularity for generated date Method Automatic midpoint detection method TimeSystem Automatic time system being used TimeZone Automatic time zone being used - With MidDate[{d1,d2,…},Methodmethod], the Method option value method determines how midpoint dates are calculated for the di dates. Possible Method values include:
-
"GranularMean" mean weighted by granularity length (default) "GranularMedian" median weighted by granularity length "WeightedMean" mean weighted by full duration of each date "UnionedMean" mean of the unioned region of all dates "MidpointMean" mean of midpoints "MidpointMedian" median of midpoints "BoundsMean" mean of the date bounds
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Get the midpoint instant for a month-granular date:

https://wolfram.com/xid/0enxc2jv4-ppn0uf

Find the day that falls in the middle of a year:

https://wolfram.com/xid/0enxc2jv4-2hziip

Find the hour that is 2/3 of the way through a given week:

https://wolfram.com/xid/0enxc2jv4-s9e0xz

Find the mid date of three instants in the year 2024:

https://wolfram.com/xid/0enxc2jv4-03yf3o

Scope (7)Survey of the scope of standard use cases
For list inputs, the midpoint is taken based on the implicit interval for each date in the list:

https://wolfram.com/xid/0enxc2jv4-pwon6h

https://wolfram.com/xid/0enxc2jv4-odwg27

The full time interval for each date is taken into account:

https://wolfram.com/xid/0enxc2jv4-b94rbu

For mid dates with coarse granularity, the date given corresponds to the instance that encompasses the midpoint, even if it begins before the first date:

https://wolfram.com/xid/0enxc2jv4-qmdmic

Get the mid date for an EventSeries:

https://wolfram.com/xid/0enxc2jv4-hwc1fs


https://wolfram.com/xid/0enxc2jv4-lsix7z

Get the mid date from a Databin:

https://wolfram.com/xid/0enxc2jv4-01s3kr

Find the mid date for an Association:

https://wolfram.com/xid/0enxc2jv4-j73bb9

Find the mid time of five times today:

https://wolfram.com/xid/0enxc2jv4-vhym9o

Find the midpoint instant of three date intervals:

https://wolfram.com/xid/0enxc2jv4-sq4sl1


https://wolfram.com/xid/0enxc2jv4-zor1ck

Options (9)Common values & functionality for each option
CalendarType (1)
DateFormat (1)
Method (5)
The default midpoint detection method ("GranularMean") takes into account granularity length when selecting a midpoint:

https://wolfram.com/xid/0enxc2jv4-8mg5gk

This means a one-week period is weighted equally whether it appears as a single "Week" date or as a sequence of seven "Day" dates:

https://wolfram.com/xid/0enxc2jv4-2f3e9

The method "WeightedMean" takes into account the full length of each date, not just its granularity:

https://wolfram.com/xid/0enxc2jv4-58y2rg


https://wolfram.com/xid/0enxc2jv4-whziig

The method "MidpointMedian" gives equal weight to all dates, regardless of granularity:

https://wolfram.com/xid/0enxc2jv4-5bkfq


https://wolfram.com/xid/0enxc2jv4-xfdp9

The method "BoundsMean" considers only the outer date bounds of the dates:

https://wolfram.com/xid/0enxc2jv4-pwc7jf


https://wolfram.com/xid/0enxc2jv4-pm4tga

Some midpoint detection methods weight for granularity, while others treat all dates as equally weighted:

https://wolfram.com/xid/0enxc2jv4-8dlpvg

https://wolfram.com/xid/0enxc2jv4-wxbgh4

https://wolfram.com/xid/0enxc2jv4-lcyyeo

https://wolfram.com/xid/0enxc2jv4-1cddjx
With only two dates given, "Weighted" methods will account for granularity and be pulled toward coarser granularity dates:

https://wolfram.com/xid/0enxc2jv4-wzx9ih

With the coarser granularity broken up into individual dates, the "Weighted" methods remain consistent:

https://wolfram.com/xid/0enxc2jv4-7oj7zj

Midpoint methods weight all dates equally and thus do not account for difference in granularity:

https://wolfram.com/xid/0enxc2jv4-8b1dd6

If broken into individual days, these midpoint methods will be pulled to the right:

https://wolfram.com/xid/0enxc2jv4-lv44q3

"WeightedMean" and "UnionedMean" both account for the full duration of dates, but "WeightedMean" will account for overlapping intervals, while "UnionedMean" will flatten all intervals:

https://wolfram.com/xid/0enxc2jv4-oh3be9

https://wolfram.com/xid/0enxc2jv4-rgzoc2

https://wolfram.com/xid/0enxc2jv4-znnwzb

TimeSystem (1)
Applications (1)Sample problems that can be solved with this function
Find the release dates of all James Bond movies:

https://wolfram.com/xid/0enxc2jv4-6v9c8t

Find the mid date of those release dates:

https://wolfram.com/xid/0enxc2jv4-8f5vp3

The midpoint of the bounds was six years later, reflecting an accumulation of releases in the early years:

https://wolfram.com/xid/0enxc2jv4-2xdwpm

Properties & Relations (1)Properties of the function, and connections to other functions
Mean, Median, Quantile and CentralFeature all use different methods to find central dates:

https://wolfram.com/xid/0enxc2jv4-5nxs0h

https://wolfram.com/xid/0enxc2jv4-tfuayo


https://wolfram.com/xid/0enxc2jv4-37hhlb


https://wolfram.com/xid/0enxc2jv4-xlioa8


https://wolfram.com/xid/0enxc2jv4-ponlad

Possible Issues (1)Common pitfalls and unexpected behavior
A list of numbers is interpreted by MidDate as a list of absolute times, not as a single date list:

https://wolfram.com/xid/0enxc2jv4-kzt21g


https://wolfram.com/xid/0enxc2jv4-k7jutq


https://wolfram.com/xid/0enxc2jv4-6ebsag

Wolfram Research (2025), MidDate, Wolfram Language function, https://reference.wolfram.com/language/ref/MidDate.html.
Text
Wolfram Research (2025), MidDate, Wolfram Language function, https://reference.wolfram.com/language/ref/MidDate.html.
Wolfram Research (2025), MidDate, Wolfram Language function, https://reference.wolfram.com/language/ref/MidDate.html.
CMS
Wolfram Language. 2025. "MidDate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MidDate.html.
Wolfram Language. 2025. "MidDate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MidDate.html.
APA
Wolfram Language. (2025). MidDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MidDate.html
Wolfram Language. (2025). MidDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MidDate.html
BibTeX
@misc{reference.wolfram_2025_middate, author="Wolfram Research", title="{MidDate}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MidDate.html}", note=[Accessed: 04-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_middate, organization={Wolfram Research}, title={MidDate}, year={2025}, url={https://reference.wolfram.com/language/ref/MidDate.html}, note=[Accessed: 04-June-2025
]}