Questions about Mathematica's date and time functions.

learn more… | top users | synonyms (1)

5
votes
1answer
112 views

Why DateDifference returns machine number?

Is there any specific reason why DateDifference cannot give an exact number in this case? ...
5
votes
1answer
517 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 ...
5
votes
4answers
197 views

Change string date/time to be understandable for mathematica

I'm trying to convert a string of a data and time to be understandable for mathematica (I want to make time related plots). However, I can get my head around how to do this. For example: ...
5
votes
1answer
70 views

ChineseLunar calendar system mystery

I tried to make a custom holiday calendar for the Korean Stock Exchange. And I found that the built-in "ChineseLunar" calendar system gives me an awkward result. The code is ...
4
votes
2answers
85 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 ...
4
votes
1answer
81 views

Poor (network) performance of Interpreter[“Time”]

I was surprised to see that Interpreter requires external WR resources as this is not documented, at least not here. On a 3Ghz iMac, took ~half a minute to ...
4
votes
2answers
160 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 ...
4
votes
2answers
67 views

How to sum values in the list that belongs to same week

I need to sum values that belongs to same week. For example, I have the list x with one column and n rows. Format: ...
4
votes
3answers
168 views

How to get a list of days from July 4th to Oct 4th over a range of years

I'd like to create a list with days from the 4th of July to the 4th of October starting in July 1970 to the current date. I tried to use DateRange, but I'm a bit ...
4
votes
2answers
290 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 ...
4
votes
1answer
109 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 ...
4
votes
1answer
128 views

Strange behavior of DateList when converting string

DateList experiences some strange behavior which i cannot explain. This code works fine: ...
4
votes
1answer
70 views
4
votes
1answer
437 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 ...
4
votes
1answer
178 views

Is DateString supposed to be truncating seconds?

If I configure DateString to format dates as ISO dates with ...
4
votes
0answers
85 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 ...
3
votes
4answers
229 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 ...
3
votes
3answers
272 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 ...
3
votes
4answers
207 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 ...
3
votes
2answers
116 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 ...
3
votes
3answers
71 views

Alternatives to DateQ of Calendar Package

This answer notes that Calendar package has a function DateQ but the documentation suggests that the input is limited to a fixed ...
3
votes
2answers
193 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?
3
votes
2answers
108 views

Slow work of TimeSeriesWindow

I have financial data (list of time-values pairs). There are more than 13000 elements. ...
3
votes
2answers
227 views

Should we invest in Apple?

Ticker[comp_String] := Interpreter["Company"][comp] /. Entity[_, x_] :> x ticks = Ticker /@ {"Apple", "Google"} {"NASDAQ:AAPL", "NASDAQ:GOOGL"} ...
3
votes
1answer
175 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. ...
2
votes
4answers
149 views

How to remove hours, minutes, seconds from list

How to remove 0 that represent hours, minutes, and seconds from a date list say a ...
2
votes
2answers
114 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 ...
2
votes
2answers
293 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
360 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; ...
2
votes
2answers
115 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 ...
2
votes
1answer
118 views

A possible bug with regard to DateObjects in Version 10?

Bug related to the Suggestion Bar Bug While getting used to the new data type Date Object in Version 10 I noted that there seems to be a bug which on my machine ...
2
votes
1answer
102 views

DateListPlot with multiple data sets and incongruous timelines?

I am using Mathematica to analyze some sales data for my company. (A copy of the available data is here.) We are trying to analyze the sales trends for each month by item. DateListPlot works well ...
2
votes
1answer
176 views

Importing data from Excel for DateListPlot

I am importing data from Excel and plotting it with DateListPlot. My code is ...
2
votes
1answer
65 views

Correct handling of milliseconds in a date time string

DateString[{2014, 5, 7, 13, 47, 44.760}, {"Year", "-", "Month", "-", "Day", " ", "Hour", ":", "Minute", ":", "Second", ".", "Millisecond"}] Returns ...
2
votes
1answer
149 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 ...
2
votes
1answer
91 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 ...
1
vote
4answers
141 views

Data format of Date including data

I have ...
1
vote
1answer
122 views

Working of Date[]

Date[] returns the current date of local system, Date[1] returns {2012, 11, 15, 17, 41, 0.3161629}, ...
1
vote
2answers
87 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
352 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]} ...
1
vote
1answer
120 views

Addition and subtraction of TimeObjects in v10 [closed]

Documentation states that "TimeObject allows addition and subtraction of time quantities". I can see that subtraction is fine, (example from doc page) TimeObject[{16, 17, 21}] - TimeObject[{10, ...
1
vote
1answer
227 views

How can Time be made to go backwards?

I would like to make a countdown timer, but cannot find a reliable method to make the DateList[] function reverse. The not so robust code for the Digital Clock with the display of seconds follows: ...
1
vote
1answer
54 views

Plotting CSV files with UTC Universal Time

So I have many CSV files in format like this: 2014-12-11T16:13:13.038337Z , 3.90092 2014-12-11T16:14:13.456558Z , 3.89734 2014-12-11T16:15:12.444318Z , 3.90092 I imported a CSV file ...
1
vote
1answer
48 views

DayRound Rounding Values:No difference between “Preceding” and “Following”?

On Mathematica 10.0.1 both DayRound[{1980, 2, 29}, "EndOfMonth", "Preceding"] and ...
1
vote
1answer
100 views

How to get matching starting dates for different `FinancialData` properties? [closed]

Why do the "Return" and "Volume" outputs of FinancialData differ? Consider the following ...
1
vote
1answer
159 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 ...
1
vote
1answer
50 views

DateListLogLogPlot

The command completion feature in Version 10.0.1.0 shows a command DateListLogLog but there is no documentation and doesn't work. Is this something that is going to be released in the near future and ...
1
vote
2answers
112 views

How to select states with equal times

Can anyone show me how to select the states that have equal times-dates. For example, i have two time series. First that have 10 observations, say from 2014/10/1 to 2014/10/10, and second that have 7 ...
1
vote
1answer
81 views

Trace two DateListPlots?

I currently have two DateListPlots in the same graph, with two different y-axes. I downloaded the package "TwoAxisDateListPlot" to accomplish this with ease. Now I want to be able to trace both of the ...
1
vote
0answers
97 views

How to create a complex variable from dated list values

Can anyone help me to construct a variable "PI" from values of variable x. Variable x represents a group of two time series rj and ri on equal dates(joined two dated lists with states).Variable x have ...