Units & Dates

Find the Date Bounds of Data

Find the first and last dates in a TimeSeries.

In[1]:=
Click for copyable input
ts = EarthquakeData[All, 8, {{2010, 1, 1}, {2015, 5, 16}}, "Magnitude"]
Out[1]=
In[2]:=
Click for copyable input
DateBounds[ts]
Out[2]=

Get the first and last dates from a list of dates in different formats.

In[3]:=
Click for copyable input
DateBounds[{DateObject[{2015}], "1950 Jan 4th", 3667285330, {2017, 1, 1}}]
Out[3]=

Use DateBounds to find the first and last time stamps associated with a Databin.

In[4]:=
Click for copyable input
DateBounds[Databin["1qGFQ8v"]]
Out[4]=

Compare the date bounds associated with different databins.

In[5]:=
Click for copyable input
binnames = { "2akVuNN2", "2anlZF8U", "2anHvIz1"};
In[6]:=
Click for copyable input
DateBounds[Databin[#]] & /@ binnames
Out[6]=

Visualize the overlap between databins using TimelinePlot.

show complete Wolfram Language input
In[7]:=
Click for copyable input
TimelinePlot[{Labeled[Interval[DateBounds[Databin[#]]], #]} & /@ binnames, Filling -> Below, PlotStyle -> "Web"]
Out[7]=

Related Examples

de es fr ja ko pt-br ru zh