10-11-2022 02:21 PM
In the flattened data set, $lastUpdatedAt is an Epoch time value (i.e. 1665404233565)
A Filter snap is being used to filter out flattened records updated prior to yesterday. There are 64 records in the dataset that meet that condition.
When the filter expression is set to
$lastUpdatedAt>=Date.parse(Date.now().minusDays(1).toLocaleDateTimeString({“format”:“yyyyMMdd”}),“yyyyMMdd”) all records are filtered out.
What filter expression will correctly filter out $lastUpdatedAt Epoch time values greater than zero hundred hours Epoch time yesterday?
10-13-2022 12:15 PM
Hi @Barbara,
The reason why all of your records are filtered out is because the expression is trying to compare stringified date value (Date.parse(Date.now().minusDays(1).toLocaleDateTimeString({“format”:“yyyyMMdd”}),“yyyyMMdd”))
with epoch time ($lastUpdatedAt)
I would advise you to go with the following expression:
$lastUpdatedAt >= Date.now().minusDays(1).getTime()
Let me know if this helps.
Regards,
Bojan