Questions about Mathematica's date and time functions.

learn more… | top users | synonyms (2)

6
votes
4answers
281 views

How to combine Date and Time objects into DateTime object?

Considering a DateObject d and TimeObject t: ...
6
votes
2answers
684 views

Finding the intersection of two date lists

I've got two lists that look like this ...
6
votes
3answers
356 views

Importing and manipulating strings - time data

I have a list of time durations, which are strings of the form: "hh:mm:ss". Here's a sample for you to play with: ...
6
votes
2answers
236 views

DateList Segmentation of data

I've been trying to separate large segments of DateList formatted data (years worth at a time) into individual days using the Split function. The data has the form: ...
6
votes
3answers
218 views

Problem About TimelinePlot

Bug introduced in 10.1 and fixed in 10.3 TimeLinePlot was introduced in 10.1 I have some data from wikipedia. ...
6
votes
3answers
279 views

Determining the dates of days

I'm trying to use WeatherData[] to give me (not sure how) the temperature, humidity, wind-speed, cloud cover... at a certain location. I only want the information ...
6
votes
3answers
139 views

EasterSunday replacement in Mathematica 10

The Calendar package, now obsolete, had functionality for "special dates", in particular EasterSunday[]. The documentation says it's been subsumed into Wolfram ...
6
votes
2answers
140 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 ...
6
votes
1answer
266 views

Can I automatically stop operation that is too slow?

I need to write code like this: Do operation 1, but if it takes more that 5 seconds then stop it and do operation 2. Is it possible to do this somehow without manual interruption?
6
votes
5answers
401 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 ...
6
votes
1answer
142 views

How to make several DateListPlot have the same scale?

I want to plot some weather data series. Unfortunately the series were collected in different episodes, from which some overlap. I would like to plot them as different plots in a column, but with ...
6
votes
1answer
652 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 ...
6
votes
2answers
119 views

Plot time along the y-axis?

How can I plot times along the Y-axis, (with dates along the X-axis) e.g. ...
6
votes
1answer
292 views

Wait / sleep miliseconds

Is there any way to make Mathematica stop for some miliseconds? I know about the Pause[] but it seems it only works with seconds.
6
votes
2answers
829 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. ...
6
votes
1answer
133 views

DateList does not output the correct time, but Date does

Bug fixed in 10.0.0+2014080602 I noticed a strange thing when trying the new astronomical data functions in Mathematica 10 on my Raspberry Pi. The Sunrise and ...
6
votes
1answer
116 views
5
votes
4answers
212 views

DateListPlot: Highs and Lows

I have this data: ...
5
votes
2answers
242 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 ...
5
votes
3answers
231 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: ...
5
votes
4answers
440 views

How to Merge Date and Time?

Given the following time series data where row is date and column is time intervals. ...
5
votes
2answers
501 views

From a list of dates get a list of the last date available in a 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 ...
5
votes
2answers
148 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: ...
5
votes
2answers
81 views

How can DateObject handle calender weeks

I have dates given for a TimeLinePlot. These dates are in {year,week} format. DateObject ...
5
votes
3answers
181 views

DateList's aggressive interpretation of TimeML duration codes

DateList "aggressively" interprets strings, such as "p72h": DateList["p72h"] gives ...
5
votes
3answers
78 views

How to ignore year in DateListPlot

I just upgraded to Mathematica 10, and I am trying to get the hang of the new TimeSeries data objects, which are preventing my old strategy of overlaying data from ...
5
votes
4answers
629 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
124 views

Why DateDifference returns machine number?

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

How to convert date string with fractional seconds to DateObject

I have a date/time string from a data file in the form "2014/01/09 07:24:36:001". I would like to convert it to a DateObject. I ...
5
votes
1answer
108 views

Handy dates conversion

I feel like something very basic is missing me, $dateformat = {"Year", "Month", "Day", "Hour"}; date = DateString[$dateformat] DateString["Date"] ...
5
votes
1answer
166 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 ...
5
votes
1answer
82 views

“ComputedDate”'s interpretation of “next”

Today Interpreter["ComputedDate"] /@ {"next Monday", "next Tuesday", "next Wednesday"} What explains this behavior? Can ...
5
votes
1answer
106 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 ...
5
votes
1answer
65 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: ...
5
votes
1answer
101 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 ...
5
votes
1answer
98 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 ...
5
votes
1answer
184 views

Throttle EventHandler KeyReleased

What might be the most elegant way to throttle the a,s functions triggered by an ...
4
votes
4answers
226 views

Extract Specific Dates from DateList

Hopefully this is an easy question but I couldn't find an easy answer anyway. Surely there is some simple way to splice this... I want to take a large datelist in the format of {{2014,12,31}, value} ...
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 ...
4
votes
4answers
269 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 ...
4
votes
1answer
146 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
3answers
314 views

How could I transform the YYYYDDD date string/Integer to YYYYMMDD date string?

suppose I have lots of YYYYDDD date Integers which look like(for example): ...
4
votes
2answers
212 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
355 views

Should we invest in Apple?

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

Strange behavior of DateList when converting string

DateList experiences some strange behavior which i cannot explain. This code works fine: ...
4
votes
1answer
60 views

Working with dates & times - nonatomic expression expected [closed]

Please note that I am new to Mathematica. I am endeavouring to import data from a CSV file with the first column a date and time. The import appears to work fine and returns the results I expect: ...