what is the {end time} for {Miklós Horthy} has {spouse} as {Magdolna Purgly} ?
what year did Miklos Horthy and Magdolna Purgly divorce
When did Miklós Horthy and Magdolna Purgly divorce?
SELECT ?x WHERE { ?v property:end_time ?x . ?v property:spouse resource:Magdolna_Purgly . resource:Miklós_Horthy property:spouse ?v }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q117144> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P26> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q835405> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q117144 p:P26 ?s . ?s ps:P26 wd:Q835405 . ?s pq:P582 ?value}