Questions about Mathematica's date and time functions.

learn more… | top users | synonyms (1)

0
votes
2answers
92 views

How to partition three years of data into daily samples

I'm trying to find mean of temperature data list. The temperature data list has 3 hours steps which means I have 365*8=2920 temperature measurements per year. My data are temperatures of 13 years. ...
4
votes
1answer
145 views

Is DateString supposed to be truncating seconds?

If I configure DateString to format dates as ISO dates with ...
1
vote
0answers
52 views

DateList does not output the correct time, but Date does

I noticed a strange thing when trying the new astronomical data functions in Mathematica 10 on my Raspberry Pi. The Sunrise and ...
0
votes
2answers
52 views

Convert epoch seconds to date [duplicate]

I have got the following datetime from an API: 1395401384298 I am guessing it is in epoch miliseconds time (it should be one day in 2014) How can i convert it into a more readable String? I have been ...
11
votes
3answers
237 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 ...
2
votes
2answers
85 views

Counting Events in a moving date range

I want to count the number of times events take place in a date range. The counting is done over a window of e.g. 28 days where the goal is to have between 11 and 13 events in the time window. The ...
1
vote
2answers
52 views

I'm trying to filter a date range by day of month and day of week - what am I doing wrong?

I am trying to generate a list of dates that match two criteria: they have to all be the first of the month, and they have to be a particular day of the week, Sunday in my case. The code I have ...
1
vote
1answer
121 views

Splitting dates into groups in half year steps

list = DayRange[{1999, 1, 1}, {2014, 2, 6}] I want to split this list into sublists one and a half year long, moving a half year forward every time. That would ...
4
votes
2answers
100 views

How to change start and end date of DateListPlot with Manipulate?

Let's say I have a one dimension list d with length L. The $x$-axis in the plot starts from ...
3
votes
4answers
164 views

Finding the location of the last day of the month in a list of dates

My question differs from earlier questions about getting the eom dates from a list; I want to get the position of those dates so I can get the corresponding values from other lists. My problem seems ...
5
votes
4answers
359 views

How to Merge Date and Time?

Given the following time series data where row is date and column is time intervals. ...
7
votes
1answer
140 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. ...
3
votes
2answers
169 views

WeatherData for the 15th day of each month

Suppose we have WeatherData["Helsinki", "MeanTemperature", {{2007, 1, 1}, {2012, 12, 31}, "Day"}] How we can have data just for 15th day of each month?
2
votes
2answers
80 views

Converting a date to a calendar quarter

I have a list that includes dates. I need to convert each date to be the last day of the quarter that it's in. So for example I want {2013,7,1,0,0,0} to become {2013,9,30,0,0,0}. Actually I don't ...
34
votes
1answer
560 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 ...
5
votes
1answer
101 views

Why DateDifference returns machine number?

Is there any specific reason why DateDifference cannot give an exact number in this case? ...
5
votes
2answers
112 views

How can AbsoluteTimes be split by date faster?

I have data where the date is stored as an AbsoluteTime. Here's a dummy dataset: ...
4
votes
0answers
82 views

JewishNewYear date limitation

The documentation for the function "JewishNewYear" in the "calendar" package declares that the year argument must be between 1900 and 2100. No explanation is given for this limitation. The function ...
5
votes
2answers
479 views

Measuring execution time of code

How one can measure the execution time (time that is spent for code to finish) of a program in Mathematica? I understand that there are general timing functions (Timing, AbsoluteTiming, TimeUsed, ...
4
votes
1answer
201 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 ...
3
votes
4answers
227 views

Test whether date is in a certain period

I have one table which contains time periods ("start" and "end") and a "type" for every ...
2
votes
1answer
149 views

Importing data from Excel for DateListPlot

I am importing data from Excel and plotting it with DateListPlot. My code is ...
1
vote
4answers
124 views
6
votes
6answers
299 views

Sort list by day names (Monday, Tuesday, etc)

I have some dates in a list, and I want to plot how many of those dates are Monday, Tuesday, etc. I'm using this: data = {...} Tally[DayOfWeek /@ data] and I ...
11
votes
2answers
792 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 ...
17
votes
1answer
854 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 ...
6
votes
2answers
176 views

How can this AbsoluteTime call be made faster?

I need to convert tons of date strings into absolute times. This generates an example data set of 10,000 strings: ...
2
votes
1answer
129 views

ReadList importing negative times

This is probably an easy question to answer, but I need a fresh eye... I'm struggling with processing the following file (extract shown here) It's a list of dates, and positive/negative time durations ...
9
votes
1answer
171 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 ...
23
votes
6answers
958 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 ...
12
votes
2answers
342 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 ...
4
votes
2answers
197 views

Can Mathematica understand Excel dates when in number format?

I have a very large Excel file with dates in the format 2013/01/17 08:02:00 PM which is a custom date format. I have to convert this file to CSV in order to import it into Mathematica because I can't ...
6
votes
2answers
369 views

Select elements of list within a date range

I have a list which consists of elements each of which has a date in DateList format, a number and a flag (Y/N). e.g. ...
2
votes
3answers
219 views

How to paint part of DateListPlot?

My graph is about fires (burned area) over 12 years presented in one Date List Log Plot. Because most of fires are in summer (as expected) I would like to highlight that with different background ...
7
votes
3answers
291 views

Find all the last weekends in a year

In order to obtain the weekends of a year you'd use something like this: ...
6
votes
5answers
306 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 ...
10
votes
5answers
664 views

Sort date list in format DD/MM/YYYY

I have a list of dates (ranging from 2007 to 2012) in the DD/MM/YYYY format and I need to sort this list. My problem is, when I simply use Sort[] I get: ...
1
vote
1answer
258 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]} ...
12
votes
1answer
215 views

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

Absolute time 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:59:60Z ...
2
votes
1answer
82 views

Is it safe to change the value of $TimeZone?

I'd like to configure some of my notebooks to assume all calculations using dates, times and locations (notably AstronomicalData , but others too) take place at the ...
20
votes
3answers
716 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 ...
9
votes
1answer
274 views

How can I get the frame ticks from DateListPlot?

DateListPlot very nicely chooses major and minor frame tick and frame tick label/markers. I am building a custom graphics function where either the ...
-1
votes
1answer
289 views

Importing Quicken Tab Delimited .*TXT File and plotting

I am using Mathematica 7 to try and plot my quicken data file. I have exported my quicken file as a .*TXT and have made zero changes to it. I want to do a ...
0
votes
1answer
113 views

Changing Datelist order

Im wondering how can I formulate a function which receives input in the string format "day.month.year hours: minutes: seconds" (for example, ...
9
votes
1answer
108 views

DateList not using current year when a year is not specified

According to the documentation when using DateList but not giving it a year it should use the current year. It is not doing that for me. Instead it uses 1900. ...
23
votes
0answers
519 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 ...
3
votes
2answers
113 views

Is there a faster way to compute the endpoint for a DateRange given the start, step, and length?

Say I am given a date start an increment step (possibly mixed radix) and a desired number of steps ...
5
votes
2answers
453 views
2
votes
2answers
264 views

How do I generate a 3d histogram of runs

This question is an extension of the question I asked here Histogram of runs. What I would like to do now is generate a Histogram3D that has the run duration on the x axis and the mean level on the ...
2
votes
2answers
311 views

Histogram of runs

What I would like to do is generate a histogram of the consecutive time spent under a level. For example if the level I was interested in was 1.0 and I had this data; ...