The documentation should explicitly mention that both sides of a comparison need to be cast to a date since datetimes are internally stored as string.
When only one side of the comparison is cast the comparison (or that part of the comparison) will silently fail similarly to #374
With a single condition:
fcli util sample-data list -q dateTimeValue==#date('2000-01-01T00:00:00+00:00')
No data
With multiple conditions:
fcli util sample-data list -q dateTimeValue==#date('2000-01-01T00:00:00+00:00') || stringValue=='value1'
Id String value Long value Double value Boolean value Date value Date time value Nested object string value Nested object boolean value Nested string aray
0 value1 1000 0.7 true 2000-01-01 2000-01-01T00:00:00+00:00 nestedObjectValue1 true nestedArrayValue3, nestedArrayValue4
1 value1 1000 0.7 true 2000-01-01 2000-01-01T00:00:00+00:00 nestedObjectValue1 true N/A
...
This could potentially be solved with a custom OperatorOverloader as mentioned in this comment https://github.com/fortify/fcli/issues/372#issuecomment-1653046742
Edit: OperatorOverloader is not applicable, it is only usable for mathematical operations, not for comparisons
The documentation should explicitly mention that both sides of a comparison need to be cast to a date since datetimes are internally stored as string.
When only one side of the comparison is cast the comparison (or that part of the comparison) will silently fail similarly to #374
With a single condition:
With multiple conditions:
This could potentially be solved with a custom OperatorOverloader as mentioned in this comment https://github.com/fortify/fcli/issues/372#issuecomment-1653046742 Edit: OperatorOverloader is not applicable, it is only usable for mathematical operations, not for comparisons