Even if a date field of a record says “3/12/2018,” the information saved in the database also includes a specific minute and second.
This means that you should never use the equals (=) operator when creating a search that filters based on date or time. By using the equals (=) operator, you are instructing the system to look for a specific combination of date, minute, and time within the specified field. For example, consider the following search:
If you ran this search on March 16, 2018 at 5:05:34 pm, the system would only find a match if a record had been created on March 16, 2018 at 12:05:34 pm exactly. As you might imagine, this is unlikely to give you the desired results.
Luckily, the solution is simple. Instead of using the equals (=) operator, you should always use the less than or equals (<=), less than (<), greater than or equals (>=), and greater than (>) operators to create two criteria that frame the day or time you are searching for. In the scenario above, you might use the following search:
If you ran this search on March 16, 2018 at 5:05:34 pm, the system would find all records that were created on March 16, 2018 between 11:05:35 am and 12:05:34 pm.