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

Does anyone know how to get EntityProperty "Date" and "DateRange" qualifiers to return data?

It seems reasonable that you should be able to use the DateRange function parameters on the "DateRange" qualifier. Sadly that does not seem to be the case.

CountryData["UnitedStates",
EntityProperty["Country", "InflationRate",
{"DateRange" -> {DateObject@{1980, 12, 31}, DateObject@{2017, 12, 31}, "Year"},
"Frequency" -> "Annual"}]]


It also seems reasonable that you should be able to pass a list of DateObjects to a "Date" qualifier but sadly that too does not seem to be the case.

CountryData["UnitedStates",
EntityProperty["Country", "InflationRate",
{"Date" -> DateRange[DateObject@{1980, 12, 31}, DateObject@{2017, 12, 31}, "Year"],
"Frequency" -> "Annual"}]]


So how are these qualifiers specified. No hints are given in the "QualifierValues" entity property either.

I have since tried a few additional methods with no luck.

The very inefficient mapping over each date which produces multiple internet calls to WRI entity server. This produces a large jumble of an error without an error message.

CountryData["UnitedStates",
EntityProperty["Country",
"InflationRate", {"Date" -> #, "Frequency" -> "Annual"}]] & /@
DateRange[DateObject@{1980, 12, 31}, DateObject@{2017, 12, 31}, "Year"]


Also tried using Dated to see if it would avoid this error. All calls fail with this method.

CountryData["UnitedStates",
Dated[EntityProperty["Country",
"InflationRate", {"Frequency" -> "Annual"}], #]] & /@
DateRange[DateObject@{1980, 12, 31}, DateObject@{2017, 12, 31}, "Year"]


I think these two may be bugs. Well, definitely the first one. I might be using Dated wrong in the second but the syntax seems to conform.

• Did you try Ctrl-= "US inflation rate from 1999 to 2010"? – Jason B. Sep 18 '17 at 18:29
• That doesn't give a useful result for me. – chuy Sep 18 '17 at 18:30
• @chuy - it doesn't return an EntityValue expression for you? – Jason B. Sep 18 '17 at 18:34
• @JasonB. it does, but the result is a single number. I strongly suspect Edmund is looking ti get back a time series or something like it. – chuy Sep 18 '17 at 18:36
• @chuy Yes. I would like it to return the TimeSeries object with the rates at the end of each year. – Edmund Sep 18 '17 at 18:37

Interval seems to be the right way to specify a date range for an EntityValue call on a "Country" entity. Using Ctrl-="US inflation rate from 1999 to 2010" to query for the linguistics, gives a returned expression,

Entity["Country", "UnitedStates"][
EntityProperty["Country", "Inflation",
{"Date" -> Interval[{DateObject[{1999}], DateObject[{2010}]}],
"Frequency" -> "Monthly",


This shows the syntax for a date range for this property is Interval[{__DateObject}]

This is a good use case for EntityInstance,

entity =
EntityInstance[
Entity["Country",
"UnitedStates"], {"Date" ->
Interval[{DateObject[{1978}], DateObject[{2010}]}]}]


Then query for properties,

entity["InflationRate"]
(* Quantity[250.686, "Percent"] *)

entity["Inflation"]


DateListPlot@%


• What is very odd is that CountryData["UnitedStates", EntityProperty["Country", "InflationRate", {"Date" -> All, "Frequency" -> "Annual"}]] returns a TimeSeries object. However there appears to be no method to specify a subset of this data with either the "Date" or the "DateRange" qualifier. Seems to be a broken framework. – Edmund Sep 18 '17 at 19:02
• For me Ctrl+= for "US inflation rate from 1999 to 2010" returns the EntitiyProperty "InfationRate" rather than "Inflation". – chuy Sep 18 '17 at 19:07
• Oh, yes. Interesting work around with EntityInstance (+1). I don't like that the property is not holding the date range and don't want to change all my code for it. Currently use a list of entities and can just use EntityValue[list, property,"EntityAssociation"] on this list to get the information needed. – Edmund Sep 18 '17 at 19:09
• @Edmund - it isn't necessary to put the modifiers on the entity, you can give them to the property. [here] is a snippet doing that. – Jason B. Sep 18 '17 at 19:34
• – Jason B. Sep 18 '17 at 19:39