Reputation: 1283
How do you use DateTime in a SqlFilter for Topics/Subscriptions?
I have this message:
var message = new BrokeredMessage();
message.Properties["datetime"] = DateTime.Now;
I also have this SqlFilter:
var sqlFilter = new SqlFilter("datetime > '2016-06-06'");
Unfortunately this doesn't work.
Upvotes: 1
Views: 583
Reputation: 1283
In order to make this work, you need to add a parameter to the filter.
var filter = new SqlFilter(" datetime >= @datetime");
filter.Parameters.Add("@datetime", DateTime.Parse("2016-06-06"));
Upvotes: 1