# How to convert ISO8601 date to YYYY-MM-DD

**URL:** <https://community.fibery.io/t/how-to-convert-iso8601-date-to-yyyy-mm-dd/4944>\
**Category:** API & Programming\
**Created:** [August 11, 2023, 4:24pm UTC](https://community.fibery.io/t/how-to-convert-iso8601-date-to-yyyy-mm-dd/4944 "2023-08-11T16:24:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexH](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@AlexH](https://community.fibery.io/u/AlexH)\
**Post date:** [August 11, 2023, 4:24pm UTC](https://community.fibery.io/t/how-to-convert-iso8601-date-to-yyyy-mm-dd/4944/1 "2023-08-11T16:24:33Z")

</div>

Hi, i have response from the server with date and time format (ISO8610):  
“2023-08-18T23:00:00-05:00”

How i can extract only 2023-08-18 from this response?

---

<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:** [August 11, 2023, 4:57pm UTC](https://community.fibery.io/t/how-to-convert-iso8601-date-to-yyyy-mm-dd/4944/2 "2023-08-11T16:57:28Z")

</div>

Are you converting in a script, or a Formula field?

---

<div class="post-metadata">

**Author:** ![AlexH](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@AlexH](https://community.fibery.io/u/AlexH)\
**Post date:** [August 11, 2023, 5:39pm UTC](https://community.fibery.io/t/how-to-convert-iso8601-date-to-yyyy-mm-dd/4944/3 "2023-08-11T17:39:28Z")

</div>

I’m using a script.  
I was able to have it work,  
datePartPU = timestampPU.split(“T”)[0]

where timestampPU=“2023-08-18T23:00:00-05:00”
