Comparing NOW date function?

Is there something like NOW() in handlebars? I need to have a rule compare a passed date to whatever the current date/time is to see if it should proceed, but I'm not seeing anything in the built-in expressions etc. 

0

Comments

3 comments
Date Votes
  • Hello Ray Wilder,

    You can use the timestamp handlebar within a compare statement like this:

     "dateCalc": {{#compare "RecordDate" "<=" "{{timestamp MM-DD-YYYY}}" }} True {{else}} False {{/compare}}

    This would look at a value in a field named "RecordDate" and verify that it was less than or equal to the current date (timestamp). If so, it would set the value to True. Otherwise, the value would be False. Let me know if that works for your purposes.

    0
  • I've been trying to figure out how to apply this and I can't quite figure out where to apply this expression. This is what I'm offered for options:

    0
  • Hi Ray Wilder,

    Based on the image you've shared, it looks like you're applying a filter. Filters don't support handlebars expression syntax. They use this syntax. You can use handlebars expressions on field mappings and other fields throughout the software, but to really point you in the right direction I'd suggest you register for one of these office hours sessions or open a support ticket.

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post