Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [date-and-time]

Questions about Mathematica's date and time functions.

Filter by
Sorted by
Tagged with
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
84 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
73 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 ...
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
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 ...
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 ...
1
vote
1answer
38 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
93 views

DateObject granularity conversion

Is there a way to convert the DateObject whose FullForm is: ...
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
3answers
65 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 ...
3
votes
1answer
28 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
113 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
23 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
141 views

Collect data points in a list into weekly groups?

Consider data of a format such as ...
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
43 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. ...
0
votes
1answer
57 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
138 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
1answer
112 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
0answers
34 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 ...
6
votes
1answer
112 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 <...
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
67 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
58 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
31 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
23 views

Interpreting date time string with milliseconds

I've noticed a discrepant behaviour between Interpreter and DateList when parsing dates: ...
1
vote
4answers
132 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
0answers
47 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
55 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 ...
3
votes
1answer
72 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, ...
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: ...
9
votes
2answers
862 views

How to count occurrences of Friday 13th

I would like to find a function that will count the number of times Friday 13th happens in a particular calendar year. Does anybody have any hints ? Thank you
1
vote
1answer
32 views

Make DateTicks appear for every day and rotated in DateHistogram

Given the following code for plotting DateHistogram: ...
4
votes
2answers
111 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 ...
1
vote
2answers
39 views

Import date and number Matrix Formatted as text

Hi I am new to Mathematica. I have a large text file that looks like: {"i":"2008-02-22","v":"9.102"},{"i":"2008-02-23","v":"11.14"},{"i":"2008-02-24","v":"12.21"}.....
3
votes
2answers
61 views

Extract time component from date in a dataset

I have a dataset of dates in the following format - Wed 18 Feb 1801 18:00. I want to extract only 18:00 from these dates i.e, the time component only. How do I go about doing so?
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 ...
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
1answer
122 views

DateObject ambiguous string interpretation?

I try to enter the following input, but receive an error message: DateObject["12/1/2016", DateFormat -> {"Month", "/", "Day", "/", "Year"}] despite having ...
-4
votes
2answers
69 views

How to calculate the age [duplicate]

How to calculate my age given date of birth? I have read other questions and answers but is not satisfied with answers. My question is how do I calculate my age if my date of birth is 18.03.2000?
-5
votes
1answer
130 views

How to calculate my age [closed]

How to calculate my age given my date of birth ? I have read other questions and answers but it is not satsified with the answers. My question is how do I calculate my current age if my birthdate is ...
20
votes
4answers
544 views

Reproducing the XKCD “Consensus New Year” plot

This xkcd strip for December 31, 2018 had the following plot: How may I use CountryData with DateListPlot (or other related ...
1
vote
1answer
43 views

Dynamic DateListPlot with multiple categories backed by DataSet

I have a DataSet that contains records with: an "activityName" string representing the kind of activity a "duration" value representing minutes a DateObject representing a date and time named "...
6
votes
1answer
90 views

Time stamps for In[] and Out[]

Once a command is entered and numbered, as in In[n], and an output is produced, as in Out[n], is it possible to find the time at which each one was done?