Questions tagged [date-and-time]

Questions about Mathematica's date and time functions.

Filter by
Sorted by
Tagged with
1
vote
0answers
33 views

AbsoluteTime problem [duplicate]

This simple table command holds no mysteries: n = 10; tmin = 0; tmax = 10; dt = (tmax - tmin)/n; list = Table[t, {t, tmin, tmax, dt}] nList = Length[list] The ...
2
votes
1answer
37 views

Is there a better fix for this problem with Legended in DateListPlot?

data = {{{{2010, 3, 31}, 100.}, {{2010, 9, 30}, 110.}}, {{{2010, 3, 31}, 80.}, {{2010, 9, 30}, 90.}}}; DateListPlot[data] With only two data points in all the ...
8
votes
1answer
225 views

Is there a way to obtain the time when an input was executed in a notebook?

I have a notebook with lots of In[n] in my current session. The notebook has been open for over three days. I would like to get the timestamps for when certain old ...
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 ...
4
votes
2answers
86 views

Manipulation and sorting of date strings, location Australia

Question 1 DateObject["30.08.90"] returns Day: Mon 2 Jun 1997. How do I get ...
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 ...
3
votes
0answers
75 views

Bug in LeapYearQ? [closed]

{#, LeapYearQ[DateObject @ {#, 1, 1}]} & /@ Range[-1000, 3000, 100] I'm surprised to find 0, 400, 800, 1200 with a True. I'm not aware that the leap year rule ...
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 ...
3
votes
1answer
81 views

Daylight hours vs calendar date

Is there a way in Mathematica or Wolfram Alpha to get a plot of daylight hours vs calendar date and rate of change of daylight hours vs calendar date. Lets say I want the plot for latitude 45 degrees ...
3
votes
3answers
66 views

DateListPlot shaded area between Gridlines

I have been trying to figure out how to shade between Gridlines and I couldn't on my own, but found this post that almost has the perfect response except that the spaces between the frame and the ...
1
vote
1answer
40 views

Convert a dateobject to list

Im trying to extract a list of times from a list of Dates from the Sunrise function ...
8
votes
1answer
94 views

DateObject granularity conversion

Is there a way to convert the DateObject whose FullForm is: ...
3
votes
1answer
144 views

How to plot the hour of the sunsets

i have this code: ...
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
1answer
30 views

Permanently labeling events on a stock DateListPlot, perhaps using ToolTip?

I would like to add notes to specific days on a DateListPlot of a stock price, and have them always be visible (not just on mouseover). So far I've got how to add a tooltip to a specific day, but not ...
4
votes
3answers
114 views

Adding and Multiplying Elements of a list together

I am trying to manipulate a file to change the time into UnixTime and for that I need the date and time but of course it needs to be date first and time second. I've tried multiplying and I've tried ...
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 ...
6
votes
2answers
143 views

Collect data points in a list into weekly groups?

Consider data of a format such as ...
1
vote
1answer
58 views

Suppressing DateString default behavior when parts of date are missing

By subsampling data from a Excel spreadsheet I have created a Mathematica dataset that I then seek to modify by applying various functions to the fields to convert these data into a different flat ...
1
vote
1answer
37 views

How to set a time range for one day and transpose it with a certain number

I would like to create a time list for one day with range from 0:00 to 23:50 and transpose this list with a constant number 239 and then transpose these two lists. I tried to make it but it doesn't ...
2
votes
1answer
44 views

Compare values in specific times between several days

I have imported csv file which is a Daily Load Diagram consisting of 3 months (1st dec 2018 to 28th feb 2019) and the values of current are taken every 10 seconds. ...
7
votes
1answer
113 views

Does Mathematica have a date region function together with operations like intersection?

Consider the following scenario. Suppose I consider time range from TimeObject[{18,30,0}] to TimeObject[{22,30,0}] on Weekdays ...
0
votes
1answer
62 views

Import many csvs from folder and change date format from american to european

I have many csv files in one folder and I have to import all of them into Mathematica. I need actually just two columns and all the rows except for the first one so I got rid of another 6 columns and ...
8
votes
1answer
141 views

Datasets and Time Values: Filtering and Plotting

After struggling for a few weeks, I have accumulated a few examples of challenging date-related operatations with datasets. Some I have partial solutions; others I cannot yet do. The resources on ...
7
votes
2answers
228 views

How to convert dayname to number?

When I input DayName[{2012,12,24}] I get Monday as output. What is the most effective way to convert Monday into 1, Tuesday into ...
6
votes
1answer
113 views

Show timing of every output

I know I can follow Wolfram's guide and enable "ShowTiming" to show the timing of the previous command at the bottom of the window. Additionally, I can enable <...
0
votes
0answers
35 views

tickless DateListPlot [duplicate]

I am using Mathematica 12.0, and when I do a DateListPlot, I get the following minimalist output: Is this some known problem, or did I not sacrifice to the appropriate gods? ADDENDUM Carl's example ...
1
vote
1answer
42 views

Applying Function to Ambiguous Dates in a Dataset

I have a large Dataset with a few columns that contain ambiguous date strings in a variety of formats. I am wanting to reformat these so they are all the same. ...
1
vote
1answer
32 views

Plotting a Histogram3D with time (a file per frame) as parameter?

I've been working for a few days trying to make a dynamic histogram on Mathematica, but I can't seem to make it happen. You see, I'm fairly new to working with Mathematica and thus lack some knowledge ...
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 ...
4
votes
1answer
72 views

Converting Daily Time Series Data into Low Frequency Data (Weekly, Bi-weekly, Monthly,..)

I have daily time series example data as follows: ...
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 ...
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 ...
1
vote
1answer
33 views

DateListPlot Didn't Display the Data [closed]

I'm trying to plot the data with DateListPlot function, but having some issues with the output. Here is what I'm doing. I'm downloading and parsing RAW JSON like this and extracting values section ...
0
votes
0answers
27 views

Interpreting date time string with milliseconds

I've noticed a discrepant behaviour between Interpreter and DateList when parsing dates: ...
1
vote
4answers
133 views

Compute “most-occuring weekdays” function

I am attempting to solve the Most-Occurring Weekdays in a Year challenge to teach myself Mathematica. Specifically, the challenge is: Write a function MostOccurringWeekday that takes an integer ...
0
votes
1answer
68 views

How to visualize a series of time differences?

Question: Given a series of times how can we visualize the time between dates? Context I have data of the following structure: ...
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
1answer
56 views

Deriving a list of time differences from a column in a dataset and appending the list as a new column

I know it's a beginner question, but I've struggled with it for some time now and can't find a solution. I have a dataset consisting of timestamps, where I've managed to compute the time differences ...
10
votes
1answer
204 views

Different behaviour of `DateRange` between 11.2 and 11.3

Bug introduced in 11.3 and fixed in 12.0. CASE:4028568 ...
1
vote
2answers
94 views

Convert data types from string to list (Coastal Buoy data) for DateListPlot

I downloaded Coastal buoy data from the CDIP webpages and saved it as a text file. The trouble is that the data has spaces between the YYY MM DD hh mm. {Edit 4/5/2019: Updated link Please see ...
3
votes
1answer
73 views

Retrieve File Dates for Files Inside an Archive (ZIP)

Suppose I have a zip archive file with many files in it. I can get a list of the files in the archive with: Import["zipfile.zip"] I can get data out of one of ...
51
votes
5answers
8k views

Mathematica command that allows it to read my intentions

In version 2.0 of Mathematica there was a command, ReadProgrammerIntentions[ ] which allowed it rapidly compose code that could solve problems simple to complex, ...
3
votes
1answer
45 views

TimeSeriesShift issue with TimeZone

I have to work with such a TimeZone to deal with daylight saving time. ...
2
votes
2answers
1k 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: ...
3
votes
2answers
386 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 ...
7
votes
3answers
387 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 the Wolfram ...
4
votes
2answers
112 views

Averaging a time series of amounts by week

I have a set of data with a list of dates (all Sundays in this case) and associated amounts. Most of these are every week, but some correspond to multiple weeks added together. I would like to average ...