what is the {end time} for {James Stewart} has {spouse} as {Gloria Hatrick McLean} ?
What year did James Stewart and Gloria Hatrick McLean divorce?
When did James Stewart and Gloria Hatrick McLean end their marriage?
SELECT ?q WHERE { ?q property:end_time ?q . resource:James_Stewart property:spouse ?q . ?q property:spouse resource:Gloria_Hatrick_McLean }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q102462> .
?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/Q20988924> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q102462 p:P26 ?s . ?s ps:P26 wd:Q20988924 . ?s pq:P582 ?value}