Questions tagged [date-and-time]

Questions about Mathematica's date and time functions.

Filter by
Sorted by
Tagged with
11
votes
3answers
741 views

Does Mathematica have Month Range and Day range?

It is known that CharacterRange["a", "z"] gives list of characters from a to z. Does Mathematica have something similar for weekdays and months of the year? ...
6
votes
1answer
96 views

DateObject for current date skips a day when crossing the date line with TimeZone

Bug introduced in 10.1 or earlier and fixed in 10.2 DateObject is new in 10.0 The DateObject was introduced in version 10 of ...
5
votes
1answer
231 views

Is it safe to change the value of $TimeZone?

I'd like to configure some of my notebooks to assume all calculations using dates, times and locations (notably AstronomicalData , but others too) take place at the ...
5
votes
1answer
197 views

How to remove the TimeZone from a TimeObject

TimeObject constructor adds TimeZone even when it's not meaningful or appropriate. In this example, Mathematica imputes ...
4
votes
2answers
430 views

Should we invest in Apple?

Ticker[comp_String] := Interpreter["Company"][comp] /. Entity[_, x_] :> x ticks = Ticker /@ {"Apple", "Google"} {"NASDAQ:AAPL", "NASDAQ:GOOGL"} ...
4
votes
2answers
1k views

FrameTicks and GridLines in DateListPlot

I would like to know what is the best way to configure one GridLine for the hour in LightGray and another for the days in ...
3
votes
1answer
103 views

What is the syntax for `EntityProperty` `“Date”` and `“DateRange”` Qualifiers?

Does anyone know how to get EntityProperty "Date" and "DateRange" qualifiers to return data? ...
2
votes
1answer
110 views

Why does TimeSeriesShift is just adding a fixed number of days?

I'd like to shift all contents of a TimeSeries object by one month. By shifting Feb. 1st I would expect to receive Mar. 1st. However it's not the case for Mathematica: ...
0
votes
2answers
181 views

How to partition three years of data into daily samples

I'm trying to find mean of temperature data list. The temperature data list has 3 hours steps which means I have 365*8=2920 temperature measurements per year. My data are temperatures of 13 years. ...
7
votes
2answers
242 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 ...
7
votes
3answers
246 views

Different results with DateRange and LeapYearsQ in Mathematica 9 and 10

With Mathematica 9.0 for Mac OS X x86 (64-bit) (January 24, 2013) one could use DateRange[{2000}, {2010}, "Year"] to achive ...
7
votes
3answers
394 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 ...
6
votes
2answers
2k views

Select elements of list within a date range

I have a list which consists of elements each of which has a date in DateList format, a number and a flag (Y/N). e.g. ...
5
votes
4answers
261 views

DateListPlot: Highs and Lows

I have this data: ...
5
votes
1answer
146 views

DateObject with DateFormat displays incorrectly in Dataset

Bug in 10.4.1 still in 11.0 DateObjects with DateFormat option appear to have the first date part truncated when displayed in a ...
5
votes
1answer
126 views

How to modify wrong time zone in a Date object?

How can one modify the wrong time zone in a DateObject, without a conversion? Can one manipulate the TimeZone directly without having the numerical value of the time changing?
3
votes
3answers
737 views

How to create a combined bar plot with time format?

I'm not sure how to add time format to bar plots. I'd like to be able to make one bar plot for one data set and another for another data set and then combine them, but I don't know how to offset each ...
3
votes
3answers
289 views

Delete rows based on specific periods

I have data (.xlsx format): two columns - data in first column imported as DateObject (dates with specific time), data in second column are numbers (113388.28, 865165.98 etc.). I want to delete the "...
2
votes
1answer
152 views

FrameTicks Problem in DateListPlot

(I have MMA 10.0.2.0 running on a MacBook Pro with OS X 10.12.6.) Before posting this question I looked at a number of interesting and helpful related posts: Is FrameTicks broken in 10.1.0?, How to ...
2
votes
3answers
2k views

Converting timestamps into a decimal in minutes

I am importing a list of timestamps (hour:minutes:seconds) from a series of text files. I have the list: ...
2
votes
2answers
452 views

Histogram of runs

What I would like to do is generate a histogram of the consecutive time spent under a level. For example if the level I was interested in was 1.0 and I had this data; ...
2
votes
1answer
191 views

DateListPlot show iso week

How can I make DateListPlot show the iso week number? I would like to make a Date plot so that for each dot it will show the iso week date in the x-axis .
1
vote
1answer
299 views

How can Time be made to go backwards?

I would like to make a countdown timer, but cannot find a reliable method to make the DateList[] function reverse. The not so robust code for the Digital Clock with the display of seconds follows: ...
1
vote
2answers
383 views

Extract data from DateListPlot, limited by PlotRange

Extracting the points from a line in a ListPlot in this answer uses points = Cases[Normal@plot, Line[pts_] :> pts, Infinity]; This works in DateListPlot (...
-5
votes
1answer
143 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 ...

1 2