# Comparing NOW date function?

**URL:** https://connective.celigo.com/t/comparing-now-date-function/1103
**Category:** Integrator.io
**Tags:** handlebars, javascript
**Created:** [May 18, 2021, 5:55pm UTC](https://connective.celigo.com/t/comparing-now-date-function/1103 "2021-05-18T17:55:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![raywilder](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@raywilder](https://connective.celigo.com/u/raywilder)
#### Post date: [May 18, 2021, 5:55pm UTC](https://connective.celigo.com/t/comparing-now-date-function/1103/1 "2021-05-18T17:55:40Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![tomsantiago](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tomsantiago/32/7158_2.png) [@tomsantiago](https://connective.celigo.com/u/tomsantiago)
#### Post date: [May 18, 2021, 8:11pm UTC](https://connective.celigo.com/t/comparing-now-date-function/1103/2 "2021-05-18T20:11:13Z")

</div>

Hello @raywilder,

You can use the [timestamp](https://docs.celigo.com/hc/en-us/articles/360039326071#timeStamp) handlebar within a [compare](https://docs.celigo.com/hc/en-us/articles/360039326071#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.

---

<div class="post-metadata">

### Author: ![raywilder](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@raywilder](https://connective.celigo.com/u/raywilder)
#### Post date: [May 24, 2021, 4:40pm UTC](https://connective.celigo.com/t/comparing-now-date-function/1103/3 "2021-05-24T16:40:38Z")

</div>

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:

 ![5301043caa20740200000001-9a6a737d757b4587ba88910db0284a71.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/0/0ebe75c933fbcde4cc00546852e4f93303711160.png)

---

<div class="post-metadata">

### Author: ![tomsantiago](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tomsantiago/32/7158_2.png) [@tomsantiago](https://connective.celigo.com/u/tomsantiago)
#### Post date: [May 27, 2021, 4:04pm UTC](https://connective.celigo.com/t/comparing-now-date-function/1103/4 "2021-05-27T16:04:16Z")

</div>

Hi @raywilder,

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](https://docs.celigo.com/hc/en-us/articles/360025927811-Apply-filters#Supportedexpressions). 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](https://docs.celigo.com/hc/en-us/articles/360045798291-Which-Office-Hours-session-should-I-attend) or open a support ticket.
