# Convert text to date

**URL:** <https://forum.mautic.org/t/convert-text-to-date/6320>\
**Category:** Product Support\
**Created:** [October 22, 2016, 11:44pm UTC](https://forum.mautic.org/t/convert-text-to-date/6320 "2016-10-22T23:44:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike-accentdm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mike-accentdm/32/1178_2.png) [@mike-accentdm](https://forum.mautic.org/u/mike-accentdm)\
**Post date:** [October 22, 2016, 11:44pm UTC](https://forum.mautic.org/t/convert-text-to-date/6320/1 "2016-10-22T23:44:05Z")

</div>

Hi  
  
  
  
I’m using the Zapier email parser to create / update contacts via the Mautic API Zap. When trying to pull in a date, the format doesn’t match the Mautic date field, and refuses to save the date.  
  
  
  
Problem is that the system that generates the email uses MM/DD/YYYY as the date format, but Mautic will only accept the date as YYYY-MM-DD. I have no way to change the date format in the email.  
  
  
  
As a workaround I’m using text fields to store the date but as I would prefer to store in a date field.  
  
  
  
Anyone have any suggestions?  
  
  
  
Thanks

---

<div class="post-metadata">

**Author:** ![mike-accentdm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mike-accentdm/32/1178_2.png) [@mike-accentdm](https://forum.mautic.org/u/mike-accentdm)\
**Post date:** [October 22, 2016, 11:44pm UTC](https://forum.mautic.org/t/convert-text-to-date/6320/2 "2016-10-22T23:44:05Z")

</div>

Hi

I’m using the Zapier email parser to create / update contacts via the Mautic API Zap. When trying to pull in a date, the format doesn’t match the Mautic date field, and refuses to save the date.

Problem is that the system that generates the email uses MM/DD/YYYY as the date format, but Mautic will only accept the date as YYYY-MM-DD. I have no way to change the date format in the email.

As a workaround I’m using text fields to store the date but as I would prefer to store in a date field.

Anyone have any suggestions?

Thanks

---

<div class="post-metadata">

**Author:** ![Elenchus](https://avatars.discourse-cdn.com/v4/letter/e/ccd318/32.png) [@Elenchus](https://forum.mautic.org/u/Elenchus)\
**Post date:** [October 26, 2016, 3:43am UTC](https://forum.mautic.org/t/convert-text-to-date/6320/3 "2016-10-26T03:43:59Z")

</div>

Zapier have a formatter:  
[https://zapier.com/help/formatter/#what-triggers-and-actions-does-formatter-support](https://zapier.com/help/formatter/#what-triggers-and-actions-does-formatter-support)

I haven’t used Zapier before, but if you can add an extra step in between the parser and the mautic api you could format the date through that before sending it on.

Another possibility would be to send the email to a script which used regular expressions to format the date before sending it on to the email parser, but you’d have to write the script and work out how to get the data into and out of it.
