Questions about Mathematica's date and time functions.

learn more… | top users | synonyms (1)

3
votes
3answers
132 views
5
votes
4answers
191 views
2
votes
3answers
119 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 ...
3
votes
3answers
131 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
2answers
90 views

SetOptions for CoordinatesToolOptions for DateListPlot?

DateListPlot does not respect my Options setting for CoordinatesToolOptions: ...
1
vote
2answers
153 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 ...
3
votes
0answers
37 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: ...
1
vote
3answers
144 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
38 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
74 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
260 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
57 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 ...
7
votes
2answers
623 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
42 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
40 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
37 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
41 views

Change date format in nested lists

I have a list of index symbols and data as follows: ...
7
votes
4answers
464 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
57 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
171 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 ...
1
vote
1answer
84 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
46 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. ...
1
vote
0answers
25 views

Expose TimeObject fractions of a second and user-defined formatting

The default TimeObject formats (doc page), don't display fractions of seconds: ...
4
votes
1answer
68 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
0answers
60 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 ...
1
vote
1answer
41 views

How to convert a string representing date into a DateList expression?

How to convert a string representing date into a DateList expression? For example, how to turn "1/2/2000" into {2000,1,2} assuming American style, and {2000, 2, 1} assuming European style, ...
2
votes
0answers
41 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 ...
1
vote
2answers
125 views

How do I remove the quotation marks from each element of a list containing dates that I have import from excel?

I've been stuck in this problem for 1 week. I just want to make a graph (Log-Return vs time (in year, month, day)). The code is: ...
1
vote
1answer
130 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 ...
3
votes
3answers
123 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"}} ...
1
vote
1answer
48 views

Why does TimeSeriesShift is just adding a fixed number of days?

I'd like to shift all contents of a TimeSeries object by one month. By shifting Feb. 1st I would expect to receive Mar. 1st. However it's not the case for Mathematica: ...
4
votes
4answers
188 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} ...
5
votes
1answer
86 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 ...
1
vote
1answer
93 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 ...
5
votes
2answers
102 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
114 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 ...
2
votes
1answer
139 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 ...
14
votes
1answer
267 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 ...
10
votes
2answers
269 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. ...
2
votes
4answers
196 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 ...
1
vote
1answer
51 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 ...
3
votes
2answers
258 views

Should we invest in Apple?

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

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

On Mathematica 10.0.1 both DayRound[{1980, 2, 29}, "EndOfMonth", "Preceding"] and ...
4
votes
2answers
85 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: ...
1
vote
0answers
107 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 ...
1
vote
2answers
121 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 ...
5
votes
4answers
256 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: ...
13
votes
3answers
1k 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 ...