what is the {end time} for {Nikola Pašić} has {position held} as {Prime Minister of Serbia} ?
When Nikola Pašić ended his position as Prime Minister of Serbia?
SELECT ?value WHERE { wd:Q313843 p:P39 ?s . ?s ps:P39 wd:Q835586 . ?s pq:P582 ?value}
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q313843> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q835586> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

Nikola Pasic ended his postion as Prime Misister of Serbia on what date?