# Questions tagged [date-and-time]

Questions about Mathematica's date and time functions.

75 questions
Filter by
Sorted by
Tagged with
3k views

### How can I manipulate TemporalData?

Version 9 introduced TemporalData but, truth be told, the documentation doesn't suggest that one can do much with it. Many of us have probably assumed we'd be ...
1k views

### Faster alternatives for DayOfWeek

It has been noticed on several occasions that DayOfWeek function is rather slow when applied to a large list of dates, e.g. in this recent question. What faster ...
487 views

### ScheduledTask with scoped variables. Working with timed evaluation

I guess I have to try harder and focus more but timed evaluation always frustrates me. I will show the issue on simple example of delayed trigger. ...
5k views

### how to make graphic timelines in mathematica

Hi does anyone know how to make timelines with mathematica? Something like that would be great!
2k views

### Simpler way to fill date gaps with zero values

One basic problem when working with data like sales and dates is the case where you don't have sales in all days, so you have to fill it to take information as average or to make a plot. See this toy ...
543 views

### Faster Alternatives to DateDifference

I need a faster implementation of FractionOfYear and FractionOfMonth, which do the following: Input: A time/date specified by <...
3k views

### How do I compute sidereal time and JD?

There was once a package that provided a wide range of functions for computing astronomical information. This package now appears to be out of date; but as near as I can tell, many of the useful ...
983 views

### Finding the intersection of two date lists

I've got two lists that look like this ...
171 views

### Improving semantic interpretation of dates

SemanticInterpretation and Interpreter are promising but imperfect, eg extracting dates and calendar expressions from semi-...
1k views

### Is it possible to import dates and times directly as AbsoluteTime and by pass DateLists?

Date and time calculations are quite slow so I am exploring ways to minimize the number of calculations performed. As an example: ...
3k views

### The Orbit and Perigee of the Flamsteed comet

Historical context This year we have the 330-th anniversary of the Battle of Vienna - one of the great formative events of European history, it took place on September 12, 1683. Kara Mustafa, Grand ...
410 views

### Is there a way to get AbsoluteTime to correctly report absolute time differences?

AbsoluteTime supposedly reports the "total number of seconds" between two dates, but it does not. For example, because of the leap second applied at 2012-06-30T23:...
697 views

### Timeline plotting: horizontal bars of time intervals

This text file logs the time that a process (identified by a number) changes state ("Brown", "Blue" etc.") ...
1k views

### UNIX time to DateList

I have data that is timestamped with UNIX time, which is the number of seconds since January 1, 1970 UTC. Unfortunately, it seems that most of the date and time functions in Mathematica are based on ...
338 views

### How do I determine astronomical transit times?

Mathematica, through the "legacy" Scientific Astronomer package, used to have the ability to easily determine accurate transit times of astronomical objects simply, with ...
902 views

### From a list of dates, get a list of the last date available in each month

I wondered if anyone has another or even a more direct way of finding the last dates of each month available from a list of successive dates? I currently do the following (note: nothing special about ...
730 views

### Converting Excel serial dates with NETLink

Excel serial dates are not straightforward to convert since they include non-existent dates, e.g. {DatePlus[{1990, 1, 0}, 59], DatePlus[{1990, 1, 0}, 60]} {{...
306 views

### SetOptions for CoordinatesToolOptions for DateListPlot?

Bug introduced in 10.0 and persisting through 11.0 or later DateListPlot does not respect my Options setting for ...
2k views

### Does Mathematica have a built-in date picker?

Does Mathematica have an interactive date input control that lets the user choose a date by browsing to a calendar view and returning the selected date as a date list? For example, something like the ...
444 views

### How is AstronomicalData interpreting its date arguments?

It is easy to confirm that the AstronomicalData is not interpreting its arguments as UTC (or "GMT", which is, in any case, ambiguous) dates by verifying that the ...
554 views

### Getting AbsoluteTiming to display in hours, minutes, and seconds

I'm doing some extended length calculations and was wondering how I could get AbsoluteTiming to display in hours, minutes, and seconds. I googled and found nothing, ...
639 views

### Plot time along the y-axis?

How can I plot times along the Y-axis, (with dates along the X-axis) e.g. ...
191 views

### HistogramList for DateHistogram?

HistogramList and Histogram are closely related: ...
702 views

### Filter list based on date

What I would like to do is remove entries from a list of instrument data when it is in maintenance. The maintenance data I have is a series of dates which look like this; ...
205 views

### Timing evaluation times dynamically

I am wanting to make a function that times how long an evaluation takes to run dynamically, with the effect similar to if I were to use an online stopwatch and started it when I hit run. If the ...
416 views

### Change x-axis date range in DateListPlot

unfortunately, I have a simple problem with my DateListPlot which I cannot solve on my own (with the guidance online). The code looks as follows: ...
223 views

### How to restart a Clock

The code below is to demonstrate color afterimages. The user chooses a color, fixates the changing number at the center until it reach 30 (seconds), then manually switches to white to observer the ...
217 views

### How to get the size of a DateObject?

DateObjects can be of varying physical dimensions. CurrentDate[Today, #] & /@ {"Day", "Month", "Year"} How do you get ...
223 views

### Make a time IntervalSlider

I want to make a time interval slider with an initial setting of (10:00:00 Mar. 8 2015, 12:30:00 Mar. 8 2015) and which varies from 00:00:00 Mar. 8 2015 to 22:30:00 Mar. 8 2015 with a granularity of ...
127 views

### Doing Date Comparisons w/ {yr, mo, day} Dates

I'm working with dates in the form, e.g., t1 = {2017,4,17} and t2 = {2017,4,3}. I want to execute commands like ...
3k views

### How can I make a heatmap of a days in year?

I know Mathematica has a ListPlot for time series but does it have a function for visualizing a list of dates as a heat map like this: This idea is from D3, check it out here.
4k views

### Determining the week of a year from a given date

Consider the following: AbsoluteTime["17/04/2012",{"Day","/","Month","Year"}]; From my calendar in my office, I know that April 17th is in the 16th week of the ...
492 views

### Handling holidays in financial time series

I have two lists: list1and list2, which are financial time series with only 2 variables—date and price. The problem is: these ...
727 views

### Does Mathematica support importing ISO 8601 date strings?

Does Mathematica have a built-in function to convert ISO 8601 formatted date strings (e.g. 2012-01-04T00:00:00) to a date list? ISO 8601 strings come in a variety ...
328 views

### Behavior of TimelinePlot with multiple datasets of associations

Bug introduced in 10.1 and fixed in 10.3 The following TimelinePlot behaves as I would expect: ...
361 views

### Problems with TimelinePlot

I'm trying to play with the example in this recent blog post, but I'm having a few basic issues with TimelinePlot: Labels are getting cut off: How can I get ...
293 views

### DateListPlot of multiple time series with data values and legend appearing as the cursor moves over ploted lines

This is very similar to my previous question. I want to use "DateListPlot" to visualize multiple time series (n) and see data values and legend as I move the cursor ...
883 views

### What calendar is Mathematica using for dates in the distant past?

It appears that Mathematica treats all dates as proleptic Gregorian dates by default, a hypothesis that can be easily tested by using AbsoluteTime to compute the ...
543 views

### Converting between AbsoluteTime and Unix time

By trial and error, I've found that the following gives the current Unix time: AbsoluteTime[] - UPOCH where UPOCH can be defined in any of the following ways: <...
1k views

### How to create a histogram of annual events, such as cherry blossom time

I have calculated blooming and ripening times for a specific variety of plant, based on actual temperature data from over 40 years. I would like to create two histograms on a single axis; one for ...
741 views

### How do I plot multiple time series from a Dataset?

I have a Dataset ds with a straightforward tabular structure containing one column Date ...
278 views

### Why do DateList, DateString, and AstronomicalData ignore \$TimeZone?

My reading of the documentation for DateList and DateString lead me to believe that both functions use ...
994 views

### How to import date (YYYY-MM-DD) data from a file?

I have a file with data in form {date, value}: 2010-05-19 17 2010-05-20 20 ...
1k views

### Simple countdown timer in Mathematica

I dug around a bit and did not find a simple and clear implementation of countdown stopwatch in Mathematica. I am looking for a function that takes as an input a certain integer and then counts down ...
177 views

### How to speed up Min of DateObjects?

I'm in version 10.0.1 using a Dataset to do some plots and things. For one of the plots I need to get the minimum date of a some filtered set of the ...
598 views

### BarChart that lines up with dates in DateListPlot

I am trying to create a chart similar to the view offered by TradingChart, but with custom data not relating to finance. ...
82 views

### How can I set up a cell style that is ascending dates? [closed]

Outline style notebooks have cell counters that are simply ascending numbers, but what if I want to apply a function to them and have descending dates like this: So that they auto format and the ...
1k views

### How do I remove the quotation marks from each element of a list containing dates that I have import from excel?

I've been stuck in this problem for 1 week. I just want to make a graph (Log-Return vs time (in year, month, day)). The code is: ...