Filter on Epoch Time

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?

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