We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [date-and-time]

Questions about Mathematica's date and time functions.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
123 views

Difference between Timing, AbsoluteTiming, and Elapsed?

In the picture below, Difference between Timing, AbsoluteTiming, Time and ...
5
votes
0answers
51 views

Speeding up Gather / DatePlus combination

I am working on a project that involves identifying runs of dates that fall within five business days of each other. Given a list of dates in inDates, the following ...
4
votes
0answers
78 views

Dynamic Clock Stops Ticking

I want a dynamic timer to tell me how long it has been since a file update. I have coded a simple timer for this, but an hour or two in after completing an update, the dynamic timer stops responding ...
4
votes
0answers
59 views

Built-in function (or terse method) to convert from DateObject to Python datetime in Python?

When using the Wolfram Client Library for Python in a Python program there appears to be no built-in function to convert a DateObject in to a Python ...
4
votes
0answers
79 views

ScheduledTask DateObject pattern to evaluate at same time everyday

I would like to create a ScheduledTask that evaluates at the same time everyday. Such as, evaluate function at 1:00 am everyday. The "Daily" timespec in ScheduledTask doesn't allow me to control the ...
4
votes
0answers
40 views

Preventing changes in TimeObject's TimeZone with subsequent operations

Is there an option or method to lock TimeZone in TimeObjects? For example, ...
4
votes
0answers
184 views

Predicting Manhattanhenge

At the time of writing, Manhattanhenge is tonight in New York City (ref 1), "an event during which the setting sun is aligned with the east–west streets of the main street grid of Manhattan, New York ...
4
votes
0answers
58 views

DateObject's DateFormat option has inconsistent result in TimelinePlot LabelingFunction and by direct call

I want to strip time and time zone from dates in the LabelingFunction of a TimelinePlot. I am using the ...
4
votes
0answers
147 views

TimelinePlot with Interval in Associations

Bug introduced in 10.2 and fixed in 10.3.0 This is related to a previous question I asked about TimelinePlot and multiple associations (Behavior of TimelinePlot ...
4
votes
0answers
171 views

Improving semantic interpretation of dates

SemanticInterpretation and Interpreter are promising but imperfect, eg extracting dates and calendar expressions from semi-...
4
votes
0answers
190 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
203 views

Memory problem in Mathematica 10

I'm having a problem with memory. I'm doing nonliner fits of several data lists to a system of differential equations. When I evaluate the "Do" cycle the memory grows with the iteration step up to my ...
4
votes
0answers
97 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
0answers
32 views

StarData, Altitude/Azimuth Anomaly with TimeZones

I am trying to compute lunar parallax using the position of the star Regulus on February 19th of this year. I get different answers depending on how I specify the date. Here are the particulars: <...
3
votes
0answers
70 views

Horrendously slow DateListPlot & Tooltip - causes, workarounds, fixes?

MMA 11.0.1.0 Win 10 64-bit i8700K The question is: how can one efficiently and speedily produce DateListPlots (or ListLinePlots with a date-time labelled x-axis calculated from x ordinates measure in ...
3
votes
0answers
41 views

Missing values vanish from expressions with DateObject and slot-lookup?

Missing value vanishes when adding or subtracting DateObject but only when slot-lookup is used, in an Association query: Given ...
3
votes
0answers
97 views

Holidays output

I wanted to print out the holidays in Germany in 2016: ...
2
votes
0answers
33 views

Bugs in PreviousDate and NextDate?

{PreviousDate[{2017, 1, 1, 0, 0, 0}, "Second"], NextDate[{2016, 12, 31, 23, 59, 59}, "Second"]} 2016 had an extra leap second. The last second of 2016 was not ...
2
votes
0answers
44 views

How to get the events and holidays occurred on a list of dates?

I have a list of 100 unix timestamps and I am trying to get all the events occurred on that time. The following code get an abort signal when a has 100 timestamps. Another problem is that when I run ...
2
votes
0answers
90 views

Comparing DateObjects with sub-second differences

How can I properly compare DateObjects with differences less than a second? This ...
2
votes
0answers
30 views

AbsoluteTiming gives vastly smaller results than it should

I've been having some recurrent issues with AbsoluteTiming and I would like to have a better idea of what causes them and whether they can be avoided. More ...
2
votes
0answers
100 views

Why are the labels twitching vertically in TimelinePlot?

Why are labels jumping up and down here: ...
2
votes
0answers
45 views

Expose TimeObject fractions of a second and user-defined formatting

The default TimeObject formats (doc page), don't display fractions of seconds: ...
2
votes
0answers
134 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 ...
2
votes
0answers
916 views

Speeding up Nonlinearmodelfit by constraining parameters?

I have a complicated parametric PDE that can be fitted to some data with NonlinearModelFit, but takes several hours to estimate the best values of the four free parameters. Currently, the code ...
1
vote
0answers
49 views

Prospective StartOfTime and EndOfTime in Mathematica

When working with conditions for numbers we have a notion of \[Infinity] representing larger than any other number and similarly ...
1
vote
0answers
34 views

How to export every n minutes?

I have a long simulation. I therefore want to export my results every N minutes. How can I do that ?
1
vote
0answers
92 views

Inequalities with DateObjects

Here the simplest example of this kind of bug ...
1
vote
0answers
165 views

NASA CDF Epoch format

This is a rather obscure question, but perhaps someone has the answer. I am trying to read/interpret a number stored in NASA's CDF Epoch format. That's the number of milliseconds past Jan 1, year zero....
1
vote
0answers
29 views

How to use the CalendarChange function in loop statement

I tried to use the following loops, but without sucess: For[i = 1, i < 7, i++, data = {632, 1, i}; CalendarChange[data, Gregorian, Islamic] ] and ...
1
vote
0answers
62 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
0answers
75 views

Make a table of changes in US coinage

I thought of an innovative use of Mathematica/Alpha that I think Stephen Wolfram would really love, but I can't figure out how to get it to work. The idea is to make a table that would chart the ...
0
votes
0answers
39 views

Bug in DayRange?

DayRange[DateObject[{2019, 1, 1}], DateObject[{2019, 12, 31}], "Holiday", HolidayCalendar -> "Germany"] Why is Oct 3 missing? It's German Unity Day since ...
0
votes
0answers
34 views

How to include `TimeConstraint` in `EulerEquations`? Is there any error here?

There is a complicated statement which takes a long time to compute. IS THERE ANY ERROR IN THE ATTACHED PICTURE? If YES, how can I include TimeConstraint of ...
0
votes
0answers
24 views

DateListPlot or combine two different lists of values for two different dates in just one day

I have created a graph with a daily load diagram which takes data from certain period of year and compare mean values in peak time (11:00 to 16:00) and displays this day with highest mean values (it ...
0
votes
0answers
30 views

DateListPlot show point with a thin bar

I have a list of date points and I want to show each point with a single verticle line that connects the point with the x-axis. I imagine that the solution should be the same as for a ListPlot.
0
votes
0answers
26 views

DateList returns unexpected result

Why does DateList[{"2018W01", {"Year", "W", "Week"}}] return this {2018, 12, 31, 0, 0, 0.} By the way, it works in ...
0
votes
0answers
27 views

Interpreting date time string with milliseconds

I've noticed a discrepant behaviour between Interpreter and DateList when parsing dates: ...
0
votes
0answers
50 views

How can I count the number of days (Monday, Tues, etc) in a year?

I am new to Mathematica and for fun am trying some of the challenges. The one I am working on now is: ...
0
votes
0answers
37 views

store `CalendarData` locally in a file and load it to a computer without internet

How to download the CalendarData indices and locally store them in a file for the computer (server) where the internet connection is not available. To run command ...
0
votes
0answers
63 views

Why does Interpreter fail intermittently?

I notice that, when I process CSV files and using Interpreter, I sometimes get Interpreter failure for certain dates as shown below: I am using the following ...
0
votes
0answers
42 views

Problem in using FrameTicks option in DateListPlot command

everyone. I have prepared a code in which a file of data to be called and its data will be used to make a plot. I wanted to divide the x axis, as I needed but the output is not what I need. I want to ...
0
votes
0answers
29 views

How to format time durations for media clips {audio, video, music, science etc}

Mathematica has powerful date, time and timeseries functions and options. Yet they all seem to be tightly tied to Time in global clock-calendar-astronomic perception. I need to do basic time-duration ...
0
votes
0answers
72 views

Control interpretation by Import

When I Import an Excel file, sometimes Mathematica interprets the dates as DateObjects, and sometimes it doesn't. How can I ...
0
votes
0answers
231 views

Plot boolean values in DateListPlot

I have a TimeSeries object in which the data is boolean (True,False) values. When I plot it using DateListPlot the result is blank. ...
0
votes
0answers
43 views

Make DateString[do,“ISODate”] also Work on Version 10

In Version 11, new types of output elements were introduced: "ISODate" and "ISOTimeDate". In order to aalso use them on Version 10, I put these lines to ...