Get date difference by keyword


(Sang) #1

Matrix Version:5.5.1.3

I am writing trigger conditions and I need a help to get date difference with published date and today’s date.

Ex)
Keyword Value

if(Published Date 6/2/2019 - Today’s date 7/8/2019 > 182) is a “Exact Match” with 1

Or other way is Ok to get the date difference.


(Marcus Fong) #2

If you mean “was this asset published 182 days or more ago?” then the keyword would be:

%globals_date_U^replace_keywords:subtract:{asset_published_U}^gt:15724800%

where 15724800 = 182 days x 86400 seconds / day


(Sang) #3

Thanks this works :slight_smile: