Skip to navigation

Can I use dates and times in PQL filters?

View as Markdown

Yes. Use ISO 8601 dates (YYYY-MM-DD), with hours, minutes, and seconds when needed. Use UTC consistently with the timestamps in your graph.

For example, this query selects customers who joined before 2022-01-01 12:45:30:

PREDICT COUNT(transactions.*, 0, 10)
FOR EACH customers.customer_id
WHERE customers.date_joined < 2022-01-01 12:45:30

Replace the table and column names with those in your graph. See Predictive Queries and Timestamp Time Zones.