function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EgoehringEgoehring 

DateTime Query for ranged times

Gang,
Maybe I have missed this somewhere, but I am having a killer time trying to figure this out. Is it possible to query a datetime field in a range without using "datefield > 2008-01-01T00:00:00Z AND datefield < 2008-01-01T23:59:59Z"
 
This creates a problem because I have a form where the users can choose dates where this could potentially mess it up.
 
Any thoughts?
werewolfwerewolf
No, what you've written is how you would specify a range of datetimes to search.  What about that is messing you up exactly?  Are you worried that users might enter a from date that's after the to date?  In that case why not just put a little JS validation on your form to prevent it?