I'm not quite sure why but I had to add the xsd:datetime cast even though the dummy data I was using to test the query was already a xsd:datetime.
I had written a custom function to do almost exactly what you had written originally. It would extract the date from a natural language string so you could say somethinglike
FILTER(?ts < myFunc:speakTime("6 months ago")
I'll have to dig it up and find out where I left off on that.
Glad to hear it. It looks like that function I wrote just needs to be updated for Stardog 7 and it's good to go. I wasn't able to deal with multiple dates so I punted and returned the first one found. I had thrown around the idea of making it a property function but I think I can now just have it return an array literal.
It reads a little oddly because it returns a date and it's really returning ?ts greater than [the time] "six months ago" so I'll have to fiddle around with how I can make it less confusing but it's nice to be able to work with dates this way sometimes. Let me know if it's something you're interested in or how you might like to have it work.