Questions about Mathematica's date and time functions.

learn more… | top users | synonyms (1)

5
votes
4answers
198 views

DateListPlot: Highs and Lows

I have this data: ...
5
votes
4answers
422 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
468 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
108 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 ...
5
votes
2answers
138 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
3answers
178 views

DateList's aggressive interpretation of TimeML duration codes

DateList "aggressively" interprets strings, such as "p72h": DateList["p72h"] gives ...
5
votes
4answers
330 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
118 views

Why DateDifference returns machine number?

Is there any specific reason why DateDifference cannot give an exact number in this case? ...
5
votes
1answer
592 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
1answer
87 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
58 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
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 ...
5
votes
1answer
91 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
0answers
126 views

Behavior of TimelinePlot with multiple datasets of associations

The following TimelinePlot behaves as I would expect: ...
4
votes
3answers
200 views

How to combine Date and Time objects into DateTime object?

Considering a DateObject d and TimeObject t: ...
4
votes
4answers
200 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
3answers
165 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: ...
4
votes
3answers
200 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
1answer
121 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
189 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
120 views

Problem About TimelinePlot

I have some data from wikipedia. ...
4
votes
2answers
92 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
177 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
368 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
112 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 ...
4
votes
1answer
116 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
141 views

Strange behavior of DateList when converting string

DateList experiences some strange behavior which i cannot explain. This code works fine: ...
4
votes
1answer
76 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 ...
4
votes
2answers
132 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 ...
4
votes
1answer
202 views

Is DateString supposed to be truncating seconds?

If I configure DateString to format dates as ISO dates with ...
4
votes
0answers
89 views

Is it possible to specify GMT as default in OpenSQLConnection or JDBC?

I'm connecting to a PostgreSQL database, with tables containing TIMESTAMPs with timezone, using ...
4
votes
0answers
88 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
235 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
309 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
244 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
187 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 ...
3
votes
2answers
123 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
134 views

Get the complement date range

Suppose that I have a date range list drlist = {{"2015-01-01", "2015-01-05"}, {"2015-01-07", "2015-01-07"}, {"2015-01-12", "2015-01-23"}} ...
3
votes
3answers
74 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
71 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 ...
3
votes
2answers
119 views

Slow work of TimeSeriesWindow

I have financial data (list of time-values pairs). There are more than 13000 elements. ...
3
votes
2answers
224 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
103 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? ...
3
votes
2answers
260 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
281 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. ...
3
votes
0answers
55 views

How can I set up a cell style that is ascending dates?

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 ...
2
votes
4answers
216 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
3answers
110 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: ...
2
votes
2answers
130 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 ...