Questions tagged [date-and-time]

Questions about Mathematica's date and time functions.

Filter by
Sorted by
Tagged with
1 vote
1 answer
32 views

How to import CSV file with mixed data, including string Mathematica expressions and numbers

I am importing a CSV file that looks like this (Extract of data as viewed in Notepad): ...
user avatar
  • 11
0 votes
1 answer
40 views

Adding observation to time series

I download three time series from FRED: ...
user avatar
0 votes
0 answers
30 views

How to Plot data that has been arranged in a table and is related to a function

I have a set of data that I want to Polt in two dimensions. The . function has been used ListLinePlotBut I did not get the desired result ...
user avatar
3 votes
2 answers
69 views

Format Time Reported by AbsoluteTiming

I am trying to format the timing reported by AbsoluteTiming so that it states the hours minutes and seconds of the result. However, probably because ...
user avatar
  • 1,393
0 votes
0 answers
35 views

DateFormat to display DateObject sub-second data?

Is there a DateFormat or other option to display milliseconds? DateObject["2022-04-18T14:02:10.326"] Sub-second ...
user avatar
  • 14.8k
3 votes
1 answer
139 views

Changing weekend definition

How to change the definition of 'Weekend' to get 'True' from every Friday from 22:00:01 to Sunday 23:00:00. Example: ...
user avatar
  • 939
0 votes
0 answers
36 views

Computing local time for next n cases of a given sidereal time?

I would like to compute the next say 500 instances of a given time in the sidereal day, outputting them in UTC. So for instance for sidereal time 1427 (meaning 14h 27m) I would get ...
user avatar
  • 175
1 vote
2 answers
60 views

Convert clock time to seconds [duplicate]

I have a long list with time values in the format Hours:minutes:Seconds. How can I convert the time back to seconds? For example (for seconds it also have a decimal fraction) ...
user avatar
  • 215
1 vote
1 answer
36 views

`DateList` hour format

I cannot find it in the documentation, what is the default form of hour in the DateList when the form {y,m,d,h,m,s} is used. I ...
user avatar
  • 3,150
4 votes
2 answers
97 views

DateHistogram with DateReduction -> editing x axis

I have a list of dates spanning over multiple years (i.e.): ...
user avatar
0 votes
2 answers
62 views

DateListPlot if condition is fulfilled

This must be very simple but I could not find an appropriate answer. I have imported a huge .xlsx file with three columns: country name, date and a value and I would like to DateListPlot the values ...
user avatar
5 votes
2 answers
158 views

Marking day versus night in DateListPlot

I would like to mark the periods of day versus night on a DateListPlot (and associated plots) by light gray regions for the night. Here's a minimal example that ...
user avatar
12 votes
8 answers
2k views

How to split a number

I have a number representing date (yyyymmdd): 19001231 I want to convert this number to {1900,12,31} How to do this? There ...
user avatar
7 votes
3 answers
171 views

Tick marks for datelistplot

I have this data and I want to plot it with six dates on the x-axis. The first tick should be the first data points date minus two days and the last tick should be the last data points date plus two ...
user avatar
0 votes
1 answer
67 views

a possible bug in IntervalUnion when applied to DateInterval

This bug persists in 13.0.1. It seems IntervalUnion may lead to unexpected results when applied to DateInterval with a ...
user avatar
  • 4,157
5 votes
2 answers
119 views

TimelinePlot, RotateLabel

Where am I going wrong with the following syntax? ...
user avatar
  • 7,759
3 votes
3 answers
151 views

Finding the index of certain strings in a list

I'm actually using a dataset of much greater dimensions and length but I simplified my problem of string patterns in order to ask this question. ...
user avatar
  • 1,024
11 votes
1 answer
279 views

Incorrect behavior of TimeObject in version 13

I used to use TimeObject in my code and pass it the string coming from a database system as follows and it used to convert it to the correct time. ...
user avatar
  • 8,075
4 votes
1 answer
136 views

v13: ListPlot and TimeSeries

The examples from the documentation for TimeSeries behave strangely in v13. Here's the first: ...
user avatar
  • 17.5k
4 votes
1 answer
48 views

How to set time zone for `DateListLogPlot`?

Sample data: ...
user avatar
  • 13.4k
3 votes
2 answers
56 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 ...
user avatar
  • 427
1 vote
0 answers
64 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 ...
user avatar
1 vote
1 answer
51 views

Labels in DateListPlot not visible

The problem: I combine two lists in one DateListPlot. The first list has labels. When I combine both in one DateListPlot, some ...
user avatar
0 votes
1 answer
89 views

How can I get the power spectrum density and separate low and high frequencies?

Good day everyone, I'm new in mathematica. I got these values over time (each value was obtained every 100 milliseconds): ...
user avatar
  • 51
0 votes
1 answer
35 views

Count number of entries based on month and year

I have the following sample data: ...
user avatar
0 votes
1 answer
44 views

Count number of entries based on date

I have the following sample data: ...
user avatar
6 votes
1 answer
185 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 ...
user avatar
2 votes
1 answer
56 views

Convert a specific column to Dateobjects

I have searched around but haven't found an answer to the following problem. I have a spreadsheet with a large number of rows and 4 columns. Column 3 contains dates not in a right format. So I want to ...
user avatar
1 vote
0 answers
57 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 ...
user avatar
  • 25.3k
1 vote
1 answer
72 views

Dynamic influenced by a countdown Clock ignores actions in second argument

I stripped a Dynamic down to its bare essentials. Dynamic doesn't execute any of the functions asked for in second argument. ...
user avatar
  • 1,647
0 votes
0 answers
38 views

Inconsistent appearance of abscissa and ordinate scales on DateListPlot

I have noticed that scales on my abscissa and ordinate of a typical DateListPlot appear inconsistently. Sometimes they show nicely, and sometimes, without any changes on my part, they don't. Any ...
user avatar
  • 457
2 votes
2 answers
122 views

DateBounds gives strange results

This has been fixed in v13.0.1 In v12.3.1, this code ...
user avatar
  • 4,157
0 votes
1 answer
57 views

DateListLogPlot Axis Labels

I have the following code: ...
user avatar
1 vote
1 answer
123 views

My dynamic button evaluates as soon as it's created. How do I stop this behavior?

I think I finally hit on the holy grail of buttons. With a very small footprint I coded a dynamic AutoSave button whose duration and frequency can be set all the while showing very useful dynamic real ...
user avatar
  • 1,647
1 vote
0 answers
73 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 ...
user avatar
  • 1,548
1 vote
1 answer
92 views

Listmanipulation with DateObject

I work with a list containing DateObjects. I want to transform the dateobject to a "Month". The list contains 6 parts. Fot simplicity, the list looks like: ...
user avatar
2 votes
0 answers
66 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 ...
user avatar
  • 1,945
0 votes
0 answers
41 views

How to do a time dependent loop for different initial conditions

I would like to do a loop for this problem, this is my code ...
user avatar
1 vote
1 answer
101 views

How to merge two DateObject list together?

I have two huge lists of flight data(one is around 7 million observations and another is around 1 million). The first one contains the city names, the departure time(accurate to the minute), and some ...
user avatar
6 votes
4 answers
212 views

Sorting Associations by DayName (day of week) using KeySort and/or KeySortBy

I have an association where the keys are the days of the week: ...
user avatar
  • 3,446
6 votes
1 answer
259 views

Plotting Timeseries without gaps or interpolation

I have a time series sampled at 5-minute frequency for a financial instrument that trades from 08:30 to 15:15 CT. No trading takes place outside those hours. I want to plot the series with the x-axis ...
user avatar
1 vote
1 answer
41 views

Not able to Select DateInterval with IntervalMemberQ

I can use Select to extract rows with specific dates from my dataset, but I'd like to instead select all rows that fall within a date interval. From the documentation, it appears that ...
user avatar
  • 3,446
2 votes
1 answer
45 views

How to set date axis of the DateListPlot to follow the order of the data

I'm trying to show plots of weekly data from multiple periods each spanning June - April. The actual starting dates vary so the dates don't actually coincide but would like to stack them to compare ...
user avatar
1 vote
0 answers
32 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 + ...
user avatar
  • 20.4k
3 votes
1 answer
55 views

DateListPlot shows longer time range than given in data

I have data as give below. The DateListPlot does show a data point beyond 27th March, that is not in the list. I tried to convert the date, set an according range .....
user avatar
  • 1,332
0 votes
0 answers
55 views

How to control the default date interval in the DateListPlot?

I am trying to plot a time series data using the DateLisPlot. While the plot comes out fine, Mathematica is choosing the default date interval as Months. My data set contains the data at the ...
user avatar
3 votes
1 answer
80 views

Retrieve the Date/Time difference in a MongoCollection

Each of my MongoDB documents contain two date-string timestamps: namely a LogOndt and LogOffdt timestamp. For example: ...
user avatar
0 votes
0 answers
61 views

TimeSeries: notation datavalue

When I use TimeSeries, The DateObject is changed in a longer notation. For example: ...
user avatar
3 votes
1 answer
67 views

Copy DateListPlot ticks in ListLinePlot (for large data)

It is not very surprising that plotting a PackedArray is faster to plot than a list of pairs (date, value), nonetheless the plotting time may be prohibitive with <...
user avatar
  • 13.6k
1 vote
1 answer
89 views

How do I correctly iterate using Outer when an argument / slot is a nested list?

I have the following complex nested iteration situation. I begin with a list, data, that comprises 16 TemporalData objects Each TemporalData object contains 2 ...
user avatar
  • 95

1
2 3 4 5
10