Questions about Mathematica's date and time functions.

learn more… | top users | synonyms (1)

5
votes
2answers
221 views

Time Zone Conversion

I use Mathematica to administer my share depots. The depots contain shares of many different time zones. I update the depot values several times a day. My problem is that Sidney, Australia, (it might ...
2
votes
1answer
54 views

DateListPlot incorrect time zone

I'm trying to plot energy usage over time using datelistplot but the time zone on the ticks is wrong, data for 7pm shows as 3am The code: ...
17
votes
10answers
2k 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 ...
20
votes
3answers
4k views

how to make graphic timelines in mathematica

Hi does anyone know how to make timelines with mathematica? http://images.nationmaster.com/images/motw/atlas_middle_east/turkey_timeline.jpg something like that would be great! thanks
3
votes
2answers
96 views

Convert DateObject into TimeObject

How to elegantly convert from DateObject to TimeObject? The purpose is to extract time from the DateObject and manipulate only ...
7
votes
1answer
129 views

Determining FinancialData for Countries

How do I determine the FinancialData for Australia. For instance the one for USA follows as: FinancialData["NYSE", "Members"] ...
3
votes
3answers
190 views

Delete rows based on specific periods

I have data (.xlsx format): two columns - data in first column imported as DateObject (dates with specific time), data in second column are numbers (113388.28, 865165.98 etc.). I want to delete the ...
4
votes
1answer
93 views

DatePlus changes in V10.2, can I return to previous behaviour?

Now in V10.2, DatePlus has changed it behaviour in a undocumented way. Now, DatePlus[n] (with n as ...
4
votes
2answers
341 views

Should we invest in Apple?

Ticker[comp_String] := Interpreter["Company"][comp] /. Entity[_, x_] :> x ticks = Ticker /@ {"Apple", "Google"} {"NASDAQ:AAPL", "NASDAQ:GOOGL"} ...
2
votes
1answer
170 views

A possible bug with regard to DateObjects in Version 10?

Bug introduced in 10.0 and fixed in 10.1 Bug related to the Suggestion Bar Bug While getting used to the new data type Date Object in Version 10 I noted that ...
5
votes
1answer
77 views

“ComputedDate”'s interpretation of “next”

Today Interpreter["ComputedDate"] /@ {"next Monday", "next Tuesday", "next Wednesday"} What explains this behavior? Can ...
9
votes
0answers
154 views

Behavior of TimelinePlot with multiple datasets of associations

Bug introduced in 10.1 and persisting through 10.2 or later The following TimelinePlot behaves as I would expect: ...
4
votes
0answers
54 views

TimelinePlot with Interval in Associations

Bug introduced in 10.2 This is related to a previous question I asked about TimelinePlot and multiple associations (Behavior of TimelinePlot with multiple ...
8
votes
2answers
145 views

SetOptions for CoordinatesToolOptions for DateListPlot?

Bug introduced in 10.0 and persisting through 10.2.0 or later DateListPlot does not respect my Options setting for ...
0
votes
0answers
29 views

How to show different DateListPlots with a popupmenu with different plot parameters

I bumped into the following problem: I have a relatively large dataset (250k row,11col), imported in from an SQL database. The format of the data is {{year,m,d,h,m,s},value}. I have successfully ...
10
votes
3answers
670 views

MovingAverage[] and Fit[] with data containing DateLists

I have data which has the following appearance: data = {{DateList, Real}, ..., {DateList, Real}} It's easy to visualize the data by using ...
1
vote
1answer
122 views

How to make a cumulative time plot?

So I'm working with this data set where there is just one input(a date and time) per line in a .csv file. I've let Mathematica understand the input using "DateStringFormat". The time looks like ...
4
votes
2answers
139 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 ...
2
votes
1answer
30 views
4
votes
3answers
214 views
5
votes
2answers
127 views

Problem About TimelinePlot

I have some data from wikipedia. ...
2
votes
0answers
64 views
4
votes
1answer
124 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 ...
0
votes
0answers
61 views

Improving semantic interpretation of dates

SemanticInterpretation and Interpreter are promising but imperfect, eg extracting dates and calendar expressions from ...
1
vote
4answers
117 views
5
votes
1answer
59 views

DateObject for current date skips a day when crossing the date line with TimeZone

The DateObject was introduced in version 10 of Mathematica. One can call it to fetch the current local date and time: ...
2
votes
3answers
125 views

Converting timestamps into a decimal in minutes

I am importing a list of timestamps (hour:minutes:seconds) from a series of text files. I have the list: ...
29
votes
1answer
768 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 ...
5
votes
1answer
92 views

Handy dates conversion

I feel like something very basic is missing me, $dateformat = {"Year", "Month", "Day", "Hour"}; date = DateString[$dateformat] DateString["Date"] ...
0
votes
0answers
39 views

Speeding up a “filling in” process

I have a sparse EventSeries that looks something like ...
4
votes
3answers
236 views
5
votes
4answers
202 views
4
votes
3answers
181 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: ...
1
vote
2answers
182 views

Extract data from DateListPlot, limited by PlotRange

Extracting the points from a line in a ListPlot in this answer uses points = Cases[Normal@plot, Line[pts_] :> pts, Infinity]; This works in DateListPlot ...
1
vote
1answer
81 views
1
vote
3answers
162 views

How to calculate time period?

I have the starting and ending dates and times. And I need to calculate the night time in this period (from 10 pm (22) to 6 am (6)). Example: starting date and time is {2015, 1, 4, 3, 10} ending date ...
1
vote
1answer
53 views

Convert Dates to values on an X axis

I have a bunch of dates and values which I put into the DateListPlot to get a graph. However I would also like to put this information into the Fit or LeastSquares to estimate what the value would be ...
5
votes
1answer
88 views

How to remove the TimeZone from a TimeObject

TimeObject constructor adds TimeZone even when it's not meaningful or appropriate. In this example, Mathematica imputes ...
14
votes
3answers
276 views

Min, Max are slow on TimeObjects

fixed in 10.1 (windows) There's something wrong with how Min and Max are implemented for ...
3
votes
2answers
77 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 ...
4
votes
2answers
2k views

No weekends please

I need to get the DateValues of the last 30 days (starting from yesterday, not today!) excluding saturdays and sundays. I want that the dates are german time (GMT ...
8
votes
2answers
742 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 ...
2
votes
1answer
49 views

DateValue returns inconsistent types

More of a 'why' than a 'how' question... DateValue[{2014,4,12},"DayName"] returns Saturday, a symbol rather than the string "Saturday". Every other result that ...
1
vote
0answers
47 views

DateObject from AbsoluteTime broken

In the middle of a session (10.0.2 / Win64 / 2.7Gb working set - peak was over 7Gb) the form/definition for DateObject from an integer has disappeared. ...
1
vote
1answer
44 views

How to change time zone for all outputs? [closed]

How to change the time zone in Mathematica for all functions returning a date or time?
1
vote
1answer
44 views

Change date format in nested lists

I have a list of index symbols and data as follows: ...
7
votes
4answers
483 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; ...
3
votes
2answers
109 views

AbsoluteTime parse two different date formats

I have a series of dates that regularly change format (24 hrs/12 hrs). Is there an easy way to parse this data? ...
1
vote
1answer
110 views

How to plot multiple yearly data in one graph

There is a dataset: for each year a single data for 6 seas. I would like to have a graph to visualize paralel changes. This is what I attempted to reproduce ...
1
vote
0answers
53 views

Is Daylight Savings Time accounted for when using AbsoluteTime[]? [closed]

I have been running rather long computations lately and timing them using AbsoluteTime[] by calling it at the start and end of the computation. ...