[Developers] date constraint by month-day only
Jack Alves
jack at metaweb.com
Thu Apr 19 23:59:12 UTC 2007
What is the best way to get topics with a date that includes a specific
month and day? I was given the query below to get all topics with a specific
full date. MQL docs specify numeric constraint operators for dates. So the
only way I can think of to get anything that happened on any Nov 22 is to
repeat the query for every year. Is there a more efficient way? Will MQL
eventually support a date contraint like "*-11-22"?
Here's the query I'm using,
{
"query":[{
"/type/reflect/any_value":[{
"link":{
"master_property":{
"name":null
}
},
"type":"/type/datetime",
"value":"1963-11-22"
}],
"id":null,
"name":null,
"sort":"/type/reflect/any_value.link.master_property.name",
"type":"/common/topic"
}]
}
Here's a link to a mjt script that uses the above query,
http://dev.mqlx.com/%7Ejack/mjt/dayHistory.html?year=1963&day=11-22
Here's a link to the queryeditor with the above query,
http://www.freebase.com/view/queryeditor/?q={%20%22query%22:[{%20%22/type/re
flect/any_value%22:[{%20%22link%22:{%20%22master_property%22:{%20%22name%22:
null%20}%20},%20%22type%22:%22/type/datetime%22,%20%22value%22:%221963-11-22
%22%20}],%20%22id%22:null,%20%22name%22:null,%20%22sort%22:%22/type/reflect/
any_value.link.master_property.name%22,%20%22type%22:%22/common/topic%22%20}
]%20%7d
More information about the Developers
mailing list