Hello Olaf,
The trick is to query for the property value node instead of the
proterty direct value.
Example in ArtBase:
https://tinyurl.com/yft9u5kg
On Wikidata, you can replace
"rt:" --> "wdt:"
"rp:" --> "p:"
"rpsv:" --> "psv:"
With the "property direct" ("rt") you query for just the value of the
property.
With "property" ("rp") you query for the node that holds the value, and
more meta-information about the value.
The node contains the "node value" ("rpsv"), and that value has a
precision value ("wikibase:timePrecision"). 9 is year level, 10 is
month level, 11 is day level.
Hope that helps! :)
select ?artwork ?inception ?date_precision WHERE {
?artwork rt:P3 r:Q5 .
?artwork rt:P26 ?inception .
?artwork rp:P26 ?inception_node .
?inception_node rpsv:P26 ?inception_value .
?inception_value wikibase:timePrecision ?date_precision .
}
LIMIT 100
--
Dragan Espenschied
Preservation Director
Rhizome at the New Museum
On Mi, Jun 23 2021 at 11:50:12 +0200, Olaf Simons
olaf.simons@pierre-marteau.com wrote:
> Dear All,
>
> I wonder whether there is a simple way to retrieve dates with the
> precision in they have been put into a wikibase.
>
> Using SPARQL I get all years such as "1749" as "1 January 1749"
> statements, no matter whether the person is born that day or not.
> Should I run different searches?
>
> Best,
> Olaf
>
>
>
>
>
> Dr. Olaf Simons
> Forschungszentrum Gotha der Universität Erfurt
> Am Schlossberg 2
> 99867 Gotha
> Büro: +49-361-737-1722
> Mobil: +49-179-5196880
> Privat: Hauptmarkt 17b/ 99867 Gotha
> _______________________________________________
> Wikibaseug mailing list -- wikibaseug@lists.wikimedia.org
> To unsubscribe send an email to wikibaseug-leave@lists.wikimedia.org