Articles on: Advanced Solutions

Building Queries around Custom Date/Time Fields

Building Queries around Custom Date/Time Fields



Often when building queries we use dates and times in our decisions. These queries can reference a specific date or time or can be more granular when referencing "one day ago" or "one day from now" for instance. When using these types of queries with date/time custom fields the logic shifts from executing as you would say it, more to execute as you would see it on a calendar.



For example: When saying an activity or action happened "Less than" "One Day Ago" we are not actually referencing things that occurred between yesterday and the present time. What we are actually referencing with this query is anything that happened when the date was less than it was yesterday.

If yesterday was December 16th, Less than December 16th would be December 15th and December 14th. So we are actually referencing the date itself in this case, so we are actually saying we are looking for an activity that happened "before" one day ago. If you are wanting to say a date from 1 day ago to present, you will use "Greater Than" instead.

Updated on: 12/01/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!