Skip to main content

Questions tagged [date-and-time]

Questions about Mathematica's date and time functions.

69 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
15 votes
1 answer
291 views

DateInterval Min/Max performance issue

Bug introduced in 12.1 and persisting through 14.0.0 Update WRI has confirmed that this is a bug. CASE:4521676 The performance of Min and ...
Rohit Namjoshi's user avatar
7 votes
1 answer
264 views

Why does DatePlus[] return different result for String date vs DateObject date?

Bug introduced in v12.1.1 or earlier and fixed in v13.0.0 I am on Mathematica 12.1.1, running the following code and getting different results. Is it bug in DatePlus? Setup ...
MiKK's user avatar
  • 563
6 votes
0 answers
232 views

Difference between Timing, AbsoluteTiming, and Elapsed?

In the picture below, Difference between Timing, AbsoluteTiming, Time and ...
Milk's user avatar
  • 1,718
5 votes
0 answers
73 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 ...
Michael Stern's user avatar
4 votes
0 answers
116 views

TimeLine Plot of Every Historical Country/Empire - how to control y axis

I'm trying to see if Mathematica can make a similar timeline to this. Specifically, note that the y axis of the graphic is based on current countries. I'd like to make a Timelineplot where I can ...
Tomi's user avatar
  • 4,548
4 votes
0 answers
75 views

Behaviour of DateRange?

Bug introduced in 12.0.0 or earlier and persisting through 13.2.0 or later. The last day of the year is Dec 31st: ...
Whelp's user avatar
  • 1,725
4 votes
0 answers
151 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 ...
user12572's user avatar
  • 436
4 votes
0 answers
123 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 ...
Ray Troy's user avatar
  • 1,299
4 votes
0 answers
55 views

Preventing changes in TimeObject's TimeZone with subsequent operations

Is there an option or method to lock TimeZone in TimeObjects? For example, ...
alancalvitti's user avatar
  • 15.1k
4 votes
0 answers
201 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 ...
sheppa28's user avatar
  • 387
4 votes
0 answers
67 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 ...
Edmund's user avatar
  • 42.4k
4 votes
0 answers
167 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 ...
Cassini's user avatar
  • 5,606
4 votes
0 answers
202 views

Improving semantic interpretation of dates

SemanticInterpretation and Interpreter are promising but imperfect, eg extracting dates and calendar expressions from semi-...
alancalvitti's user avatar
  • 15.1k
4 votes
0 answers
224 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 ...
Peter's user avatar
  • 41
4 votes
0 answers
215 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 ...
Miguel's user avatar
  • 981
4 votes
0 answers
103 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 ...
jmizrahi's user avatar
  • 151
4 votes
2 answers
74 views

DateBounds for DateInterval are wrong

I am on version 12.3.1 (MS Windows) and I want to get the date bounds of a date interval of a few months (let's say October and November), but the max bound is wrong. I tried ...
Jan Hubik's user avatar
  • 457
3 votes
0 answers
124 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 ...
Julian Moore's user avatar
  • 2,560
3 votes
0 answers
177 views

Comparing DateObjects with sub-second differences

How can I properly compare DateObjects with differences less than a second? This ...
T_202's user avatar
  • 105
3 votes
0 answers
45 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 ...
alancalvitti's user avatar
  • 15.1k
3 votes
0 answers
108 views

Holidays output

I wanted to print out the holidays in Germany in 2016: ...
mrz's user avatar
  • 11.7k
3 votes
0 answers
55 views

Expose TimeObject fractions of a second and user-defined formatting

The default TimeObject formats (doc page), don't display fractions of seconds: ...
alancalvitti's user avatar
  • 15.1k
2 votes
0 answers
70 views

TimeSeriesWindow with InfiniteFuture returns last observation beyond starting date

I use Wolfram Mathematica 12.1 and want to subset a TimeSeries, but noticed that TimeSeriesWindow returns last observation even for range that does not intersect with the original TimeSeries. Here is ...
iav's user avatar
  • 2,016
2 votes
0 answers
44 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 ...
Andreas Lauschke's user avatar
2 votes
0 answers
77 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 ...
0x90's user avatar
  • 599
2 votes
0 answers
110 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 ...
Emilio Pisanty's user avatar
2 votes
0 answers
105 views

Why are the labels twitching vertically in TimelinePlot?

Why are labels jumping up and down here: ...
M.R.'s user avatar
  • 31.6k
2 votes
0 answers
143 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 ...
Branimir's user avatar
  • 171
2 votes
0 answers
1k 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 ...
DRG's user avatar
  • 877
1 vote
0 answers
54 views

Mathematica 13.1 - New Cell Options

I have been using Mathematica for many years now and never encountered anything like that. My version is 13.1. In one of my notebooks, I must have clicked some shortcut by mistake, and now the new ...
Omer Amit's user avatar
1 vote
0 answers
44 views

DateFormat for ISO8601 string with TimeZone?

What is the DateFormat to convert ISO8601 string with timezone to DateObject? For exmaple, ...
alancalvitti's user avatar
  • 15.1k
1 vote
0 answers
137 views

Converting imported dataset columns to DateObject

I'm really banging my head against a wall here with something that feels like it should be simple. I am importing a .csv with a header row as a Dataset. One of the columns is Time, formatted as ...
delangle's user avatar
1 vote
0 answers
62 views

Can I choose a Cloud Kernel Version to run my code? (DatePlus broken case)

One of my APIs suddenly broke, and I discovered that if I evaluate ...
Murta's user avatar
  • 26.3k
1 vote
0 answers
282 views

Plot Dataset, convert to time series

How do I plot an imported dataset? In pandas one can use pd.DataFrame.plot(), which includes multiple column plotting too. How ...
Al Guy's user avatar
  • 1,610
1 vote
0 answers
35 views

Why does shift-drag resizing a DateListPlot cause the line to disappear?

Start with the following plot: DateListPlot[FinancialData["IBM", "Jan. 1, 2004"]] I want to resize it to make it a bit wider, so I use SHIFT + ...
flinty's user avatar
  • 25.6k
1 vote
0 answers
59 views

Truncating a TimelinePlot?

I have a very large TimelinePlot dataset that extends months out into the future (it is being used as a milestone timeline, similar to a Gantt chart). Question: Is there a way to programatically ...
George's user avatar
  • 3,145
1 vote
0 answers
66 views

Apply DateObject to a whole list

I'm trying to apply DataObject to a whole list. It looks something like this. ...
iLixer's user avatar
  • 11
1 vote
0 answers
33 views

TimeSeriesRescale seems to work oddly

I have been attempting to do some date computations with EventSeries, a convenient form for storing economic quantities (like expenses) over time. Following the documentation, I created an list of ...
Mike Colacino's user avatar
1 vote
0 answers
50 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 ...
user13892's user avatar
  • 9,483
1 vote
0 answers
38 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 ?
james's user avatar
  • 3,093
1 vote
0 answers
120 views

Inequalities with DateObjects

Here the simplest example of this kind of bug ...
Fortsaint's user avatar
  • 2,060
1 vote
0 answers
257 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....
Anthony Mannucci's user avatar
1 vote
0 answers
30 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 ...
hisham's user avatar
  • 11
1 vote
0 answers
76 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. ...
Ymareth's user avatar
  • 4,751
1 vote
0 answers
81 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 ...
Tyler Durden's user avatar
  • 4,102
0 votes
0 answers
51 views

Plot time (hours, minutes, seconds) along y axis

I would like to plot time (in hours, minutes, seconds) on the ordinate and date on the abscissa, much as in this answer, but I don't want to convert the abscissa values to a single unit (e.g., seconds)...
David G. Stork's user avatar
0 votes
0 answers
59 views

How to access the Wolfram Data Repository

How I can obtain the raw data of different epidemics in different viruses such as COVID-19, ebola, influenza, etc.? I consulted the site but I can't figure out how to extract the data in real time to ...
azo's user avatar
  • 1
0 votes
0 answers
37 views

DateListPlot and PlotLegends make FrameTicks disappear

I am using Mma12.0 ($Version gives "12.0.0 for Microsoft Windows (64-bit)"). Consider the procedures below: Open a new notebook. Type this code and run: <...
Harry's user avatar
  • 2,745
0 votes
0 answers
50 views

Force time series to drop the date part and keep only the time one

Mathematica's TimeSeries takes as an input the values and the time. If I have a TimeObject with timestamps (without the date, ...
Stelios's user avatar
  • 56
0 votes
0 answers
57 views

Can I use Timeseries of a Data to plot the ARCHProcess?

So, I have a list s={Timeseries1,Timeseries2,Timeseris3} I want to Plot a graph just like :Mathematica I tried to do this but I didn't understand some parts of the ...
amalsebastian7's user avatar