Forum Discussion
DougS
10 years agoKhoros Alumni (Retired)
You would have to specify a timerange in the query (you need a start time and an end time). If you were coding this in an endpoint, you could generate the query you need with something like this:
<#assign now = dateSupport.now /> <#assign nowMs = now.millisecondsAsString /> <#assign weekBefore = now.addWeek(-1) /> <#assign weekBeforeMs = weekBefore.millisecondsAsString /> <#assign query = "SELECT count(*) FROM messages WHERE board.id = 'technology' AND post_time > " + weekBeforeMs + " AND post_time < " + nowMs + " ORDER BY post_time DESC" />
-Doug
Sign in to react to this post
irach15
10 years agoMaven
thank you, yes, I've done something like that too. I was thinking if any faster way around :-)
Sign in to react to this post
- sam29 years agoGuideWe can use "rangeTime" attribute for that in our endpoint call for V1.
eg:- /restapi/vc/search/messages/count?q="anything u want to search"&rangeTime=1MSign in to react to this post