Temporal

Time Precision

Wikidata dates come with precision metadata. Learn to handle year-only, month-only, decade, and exact dates in your queries.

Understanding Date Precision

Not all dates are known exactly. Wikidata stores dates with precision information indicating whether only the year, month, or exact day is known. This is stored using the wikibase:timePrecision property on the statement value node.

Precision Value Meaning Example Display
6 Millennium "2nd millennium"
7 Century "19th century"
8 Decade "1990s"
9 Year "1995"
10 Month "May 1995"
11 Day "May 23, 1995"

Accessing Precision Information

Query Date with Precision
Run ↗
SELECT ?lang ?langLabel ?inception ?precision
WHERE {
  ?lang wdt:P31 wd:Q9143 ;
        p:P571 ?inceptionStatement .

  # Get the value and precision
  ?inceptionStatement psv:P571 ?timeValue .
  ?timeValue wikibase:timeValue ?inception ;
             wikibase:timePrecision ?precision .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
ORDER BY ?precision
LIMIT 50

Filtering by Precision

Only Exact Dates (Day Precision)
Run ↗
SELECT ?lang ?langLabel ?inception
WHERE {
  ?lang wdt:P31 wd:Q9143 ;
        p:P571 ?inceptionStatement .

  ?inceptionStatement psv:P571 ?timeValue .
  ?timeValue wikibase:timeValue ?inception ;
             wikibase:timePrecision ?precision .

  # Only day-precise dates (precision = 11)
  FILTER(?precision = 11)

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
ORDER BY ?inception
LIMIT 50
Only Year-Level Precision
Run ↗
SELECT ?lang ?langLabel (YEAR(?inception) AS ?year)
WHERE {
  ?lang wdt:P31 wd:Q9143 ;
        p:P571 ?inceptionStatement .

  ?inceptionStatement psv:P571 ?timeValue .
  ?timeValue wikibase:timeValue ?inception ;
             wikibase:timePrecision ?precision .

  # Only year precision (=9), not month or day
  FILTER(?precision = 9)

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
LIMIT 50

Precision in Cultural Heritage

Artworks with Uncertain Dates
Run ↗
SELECT ?artwork ?artworkLabel ?inception ?precision
       (IF(?precision = 7, "Century",
        IF(?precision = 8, "Decade",
        IF(?precision = 9, "Year",
        IF(?precision = 10, "Month",
        IF(?precision = 11, "Day", "Other"))))) AS ?precisionLabel)
WHERE {
  ?artwork wdt:P31 wd:Q3305213 ;  # painting
           p:P571 ?statement .

  ?statement psv:P571 ?timeValue .
  ?timeValue wikibase:timeValue ?inception ;
             wikibase:timePrecision ?precision .

  # Imprecise dates: century (7) or decade (8)
  FILTER(?precision IN (7, 8))

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
}
LIMIT 50
Precision Distribution for Archaeological Sites
Run ↗
SELECT ?precision
       (IF(?precision = 6, "Millennium",
        IF(?precision = 7, "Century",
        IF(?precision = 8, "Decade",
        IF(?precision = 9, "Year",
        IF(?precision = 10, "Month",
        IF(?precision = 11, "Day", "Other")))))) AS ?level)
       (COUNT(?site) AS ?count)
WHERE {
  ?site wdt:P31 wd:Q839954 ;  # archaeological site
        p:P571 ?statement .

  ?statement psv:P571 ?timeValue .
  ?timeValue wikibase:timePrecision ?precision .
}
GROUP BY ?precision
ORDER BY DESC(?count)

Urban: Building Dates by Precision

Buildings with Precise vs Approximate Dates
Run ↗
SELECT
  (SUM(IF(?precision >= 10, 1, 0)) AS ?precise)
  (SUM(IF(?precision = 9, 1, 0)) AS ?yearOnly)
  (SUM(IF(?precision < 9, 1, 0)) AS ?approximate)
WHERE {
  ?building wdt:P31/wdt:P279* wd:Q41176 ;  # building
            wdt:P17 wd:Q142 ;              # in France
            p:P571 ?statement .

  ?statement psv:P571 ?timeValue .
  ?timeValue wikibase:timePrecision ?precision .
}

Best Practices