-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hello,
does this implementation supports comparing two datetimes.
I've tried this:
- If I check dates it always returns True
var now = DateTime.UtcNow.ToString();
string jsonText = "{\"<=\": [{\"var\": \"InvoiceDate.ToString()\"}, \"" + now + "\" ]}";
var now = DateTime.UtcNow.AddDays(-5).ToString("yyyy-MM-dd");
string jsonText = "{\"<=\": [{\"var\": \"InvoiceDate.ToString(`yyyy-MM-dd`)\"}, \"" + now + "\" ]}";
- Using ISO dates I'm getting exception about invalid input
now = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ"); //
jsonText = "{\"<=\": [{\"var\": \"InvoiceDate.ToString(`yyyy-MM-ddTHH:mm:ssZ`)\"}, \"" + now + "\" ]}";
- What is also interesting, when I use string property it fails again. Why is this "System.FormatException: 'Input string was not in a correct format.'"
{{
"<=": [
{
"var": "InvoiceDateString"
},
"2021-07-20T16:44:12Z"
]
}}
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
Metadata
Metadata
Assignees
Labels
No labels