What is {spouse} of {Kamal Haasan} that is {end time} is {1985-1-1} ?
On January 1st, 1985 who was Kamal Haasan's wife?
Who was the spouse of Kamal Haasan in 1985-1-1?
SELECT ?t WHERE { ?g property:end_time ?e . FILTER ( CONTAINS ( YEAR ( ?e ) , '1985' ) ) . ?g property:spouse ?t . resource:Kamal_Haasan property:spouse ?g }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q381477> .
?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> ?obj .
?statement <http://www.wikidata.org/entity/P582> <1985-1-1>
} 

SELECT ?obj WHERE { wd:Q381477 p:P26 ?s . ?s ps:P26 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1985')) }