# How to get Javascript Date() object from a Date field (in a template)?

**URL:** <https://community.fibery.io/t/how-to-get-javascript-date-object-from-a-date-field-in-a-template/2820>\
**Category:** Get Help\
**Created:** [May 18, 2022, 6:54pm UTC](https://community.fibery.io/t/how-to-get-javascript-date-object-from-a-date-field-in-a-template/2820 "2022-05-18T18:54:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [May 18, 2022, 6:54pm UTC](https://community.fibery.io/t/how-to-get-javascript-date-object-from-a-date-field-in-a-template/2820/1 "2022-05-18T18:54:25Z")

</div>

This isn’t working:  
`<%= new Date( task['Due Date'] ).toLocaleDateString() %>`

It just results in the string “Invalid Date”.
