query-85cdd74cadc76ecbcea0984369803399

rq turtle/ttl

Date output format 15:08, 19 December 2017 (UTC)) talk (TagishsimonHow do I get the format of my date to be YYYY-MM-DD in the output of the following? thx --

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?wikidata_groupLabel ?genderLabel ?areaLabel ?DoB
WHERE {
  ?item p:P39 ?mem.
  ?mem ps:P39 wd:Q18607856.
  OPTIONAL { ?mem pq:P4100|pq:P102 ?wikidata_group. }
  OPTIONAL { ?mem pq:P768 ?area. }
  OPTIONAL { ?item wdt:P21 ?gender. }
  OPTIONAL { ?item wdt:P569 ?DoB. }
  FILTER NOT EXISTS { ?mem pq:P582 []. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?DoB"):::projected v4("?area") v5("?gender") v2("?item"):::projected v1("?mem") v3("?wikidata_group") a1((" ")) c11(["bd:serviceParam"]):::iri c4(["wd:Q18607856"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:qualifier/P582"--> e0a1 e0v1("?mem"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"p:qualifier/P582"--> a1 v2 --"p:P39"--> v1 v1 --"p:statement/P39"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 -."p:qualifier/P102".-> v3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:qualifier/P4100"--> v3 end union0r <== or ==> union0l end end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:qualifier/P768".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P21".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P569".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end