Try our conversational search powered by Generative AI!

Filter date with VideoQuery criteria

Vote:
 

How do I filter data ranges using VideoQuery? The SDK would be much helpful if only they have examples.

I'm thinking it could be done via VideoQuery.Criteria but I'm not sure what exactly to put in there if I want to filter Video.CompletionDate or Created.

I want to get all videos with date From September 1 2011 to September 10 2011.

 

Currently I'm just getting all the VideoCollection and re-iterating each video from that collection and checking the date which is not efficient at all. Looking for a better way to do this.

#54226
Oct 06, 2011 2:10
Vote:
 

Something like this:

// vq is the VideoQuery
vq.Created = new DateTimeCriterion();
vq.Created.Operator = ComparisonOperator.GreaterThan | ComparisonOperator.Equals;
vq.Created.Value = minDate;
vq.Created.Operator2 = ComparisonOperator.LessThan | ComparisonOperator.Equals;
vq.Created.Value = maxDate;

 

#54241
Oct 06, 2011 11:51
Vote:
 

PERFECT! Exactly what I need.

 

Thanks Magnus!

#56129
Jan 09, 2012 1:43
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.