# Mapper 2.0 - Handlebar Date Conversions

**URL:** <https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660>\
**Category:** Integrator.io\
**Tags:** mapper, import\
**Created:** [May 27, 2025, 1:48pm UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660 "2025-05-27T13:48:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Thangaraj](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@Varun\_Thangaraj](https://connective.celigo.com/u/Varun_Thangaraj)\
**Post date:** [May 27, 2025, 1:48pm UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660/1 "2025-05-27T13:48:20Z")

</div>

Hello All,

I'm trying to perform PST to UTC Conversion through handlebars in the Mapper 2.0 for the bulk import mode.

On Trying the handlebar expression (_{{dateAdd (dateFormat "YYYY-MM-DDTHH:mm:ssZ" updated\_at "MM/DD/YYYY HH:mm a" "UTC") "25200000"}}_) out in handlebar editor, for the input of **05/20/2025 2:31 am** , i'm getting result as '2025-05-20T09:31:00.000Z'

 ![This image shows a settings interface for configuring a date transformation using a Handlebars expression with options for field mapping, handling empty values, and a settings description. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/b/bfc47610cef0531c8434ffa9b8be09a3969525b5.png)

But Post saving this, and testing preview on mapper 2.0 for the same input, i'm getting invalid\_date.

Any ideas on how to resolve this.

Thanks for any inputs shared

---

<div class="post-metadata">

**Author:** ![sreevaniamara](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/sreevaniamara/32/6926_2.png) [@sreevaniamara](https://connective.celigo.com/u/sreevaniamara)\
**Post date:** [May 27, 2025, 2:17pm UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660/2 "2025-05-27T14:17:34Z")

</div>

@Varun_Thangaraj - If the input structure shown in the mapper's input section looks like below:

```json
{
  "updated_at": "05/20/2025 2:31 am"
}

```

then use 'record.updated\_at' to reference the 'updated\_at' value in the handlebar expression.

---

<div class="post-metadata">

**Author:** ![Varun\_Thangaraj](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@Varun\_Thangaraj](https://connective.celigo.com/u/Varun_Thangaraj)\
**Post date:** [May 27, 2025, 2:56pm UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660/3 "2025-05-27T14:56:30Z")

</div>

Hi @sreevaniamara ,

Thanks for the reply.

Even on referencing as record.updated\_at, i'm still getting invalid\_date.

My confusion is the difference on evaluation of handle bars inside editor and mapper 2.0.

Expression:

```auto
{{dateAdd (dateFormat "YYYY-MM-DDTHH:mm:ssZ" record.updated_at "MM/DD/YYYY HH:mm a" "UTC") "25200000"}}

```

Input

```auto
{
  "updated_at": "05/20/2025 2:31 am"
}

```

output:

```auto
[
  {
    "updated_at": "Invalid date"
  }
]

```

Note:  
I'm creating destination rows from source records

---

<div class="post-metadata">

**Author:** ![sreevaniamara](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/sreevaniamara/32/6926_2.png) [@sreevaniamara](https://connective.celigo.com/u/sreevaniamara)\
**Post date:** [May 27, 2025, 3:39pm UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660/4 "2025-05-27T15:39:48Z")

</div>

@Varun_Thangaraj, can you please share screenshots of your mapping along with input and output, please mask any sensitive information. This will help us analyse the issue.

---

<div class="post-metadata">

**Author:** ![Varun\_Thangaraj](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@Varun\_Thangaraj](https://connective.celigo.com/u/Varun_Thangaraj)\
**Post date:** [May 27, 2025, 4:30pm UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660/5 "2025-05-27T16:30:11Z")

</div>

Hi @sreevaniamara ,

Please find the info below  
Mappings:

 ![The image shows a mapping interface for importing Netsuite invoices, with fields for invoice details like ID, date, amount, status, and terms. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/3/38b5255b4568b26f6d26cf829f5e1e19e48088e7.png)

input

```auto
{
  "netsuite_invoice_internal_id": "74774763",
  "invoice_no": "temp",
  "status": "Paid In Full",
  "date": "02/01/2022",
  "due_date": "02/01/2022",
  "total_amount": "148.99",
  "paid_amount": "148.99",
  "remaining_amount": ".00",
  "billed_contract_id": "",
  "type": "temp",
  "paying_terms": "temp",
  "generated_from": "temp",
  "created_at": "02/01/2022 10:46 pm",
  "updated_at": "05/20/2025 2:31 am"
}

```

output is same , only created\_at,updated\_at has handle bar expressions to convert timezone

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [May 28, 2025, 5:22am UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660/6 "2025-05-28T05:22:45Z")

</div>

Couple questions:

- What database/datawarehouse are you trying to bulk load into?
- I'm not able to reproduce this and preview is working fine for me. Can you share your flow zip?

Additionally, I would highly recommend doing this instead/in addition to:

> [@NetSuite date format in Celigo export -- where set?](https://connective.celigo.com/t/netsuite-date-format-in-celigo-export-where-set/563):
>
> Hello All -- I am exporting project records from NetSuite via Saved Search flow. The date fields are exported in European D/M/YYYY format. My personal date format setting is DD-MMM-YYYY. The NetSuite Company Preferences setting is the European format. Does the export via Celigo always use the Company setting? This is hinted by [this Celigo support post](https://docs.celigo.com/hc/en-us/articles/4408951702171-Fix-the-date-format-error). I need to be sure of the setting to apply the correct conversions for the destination. Thanks!

My setup for reference:

 ![The image shows a user interface for building a Handlebars expression, with a template editor, available resources, and a preview section displaying a computed date. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/9/91e85d3800e5b611f8991da010f41c651ce4576e.jpeg)  
 ![The screenshot shows a software interface for editing a field mapping, with settings for a "created_at" field using a Handlebars expression for date formatting. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/e/e4d54fb802efbd65727ff4ee707adffac3780b7c.png)  
 ![The image shows a software interface for editing a data mapping configuration, with input and output fields displayed. (Captioned by AI)](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/c/cf62b7e6e8357aea2c4085fe675bc170c64bb151.png)

---

<div class="post-metadata">

**Author:** ![Varun\_Thangaraj](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@Varun\_Thangaraj](https://connective.celigo.com/u/Varun_Thangaraj)\
**Post date:** [May 28, 2025, 7:03am UTC](https://connective.celigo.com/t/mapper-2-0-handlebar-date-conversions/4660/7 "2025-05-28T07:03:20Z")

</div>

Hi @tylerlamparter ,

Thanks a lot, the Saved Search Approach worked like charm.

Will check with fresh flow once why my flow is throwing error though.
