-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compare Two Datetimes #29
Comments
@draxtor, I think there is an error in the I am assuming that you want to compare 2 date variables. So, first, you will need to add them in your data context. So, something like: var data = new
{
Date1 = DateTime.Now,
Date2 = DateTime.Now.AddDays(4),
}; In your json logic, then, you can compare these two: var jsonText = @"{\"<\": [{\"var\": \"Date1\"}, {\"var\": \"Date2\"}] }"; |
Ah sorry my ticket was incomplete (most probably copy mistake).
I forked your repo and saw that issue was in file EvaluateOperators.cs, GenericArgsSatisfy method. Since my date literal is parsed as datetime by Newtonsoft.Json and is not text then Double conversion is tried and of course it fails. I made some changes there and it was working, but it was just a test change not candidate for PR. |
Hello,
does this implementation supports comparing two datetimes.
I've tried this:
Is there any way I can compare two dates?
And if the answer is yes is there a way to use functions? I would like to check against current DateTime in runtime.
Thanks
The text was updated successfully, but these errors were encountered: