- To get the date differences between two date fields in a dataset, subtract the date fields to obtain the milliseconds values. Example: select *, dateB-dateA as newDate
- To add/subtract a date or time, add/subtract the number of milliseconds to the date field. For example. to subtract a day from the date field: select *, dateA-(24*60*60*1000) as minusOneDay
- In a where clause, you can also use date tokens for adjustable dates. For example: select * where dateField > $c9_today-4d. See more on date tokens here.
Please sign in to leave a comment.