# Why does my custom code return invalid dates in HubSpot?

**URL:** <https://community.hubspot.com/t/why-does-my-custom-code-return-invalid-dates-in-hubspot/137238>\
**Category:** APIs & Integrations\
**Tags:** companies, developer-tools, sdk, object\
**Created:** [July 31, 2025, 4:55pm UTC](https://community.hubspot.com/t/why-does-my-custom-code-return-invalid-dates-in-hubspot/137238 "2025-07-31T16:55:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![DCrinnion1](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@DCrinnion1](https://community.hubspot.com/u/DCrinnion1)\
**Post date:** [August 1, 2025, 9:27am UTC](https://community.hubspot.com/t/why-does-my-custom-code-return-invalid-dates-in-hubspot/137238/3 "2025-08-01T09:27:36Z")

</div>

Thank you for the info! Not sure if at this point its a bug, but changed it in the code, and then re-added the output to the fields and still saying invalid date, unless do I need to programme it so the output says ms as well?

 ![Screenshot 2025-08-01 at 10.26.44.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/6/0611f6b92ba9909d6ed4ee9208f23004240db0e2.png)

 ![Screenshot 2025-08-01 at 10.27.06.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/0/703574ea967273159c112f4539a1dcf0e9f5d6d8.png)

---

_[View the full topic](https://community.hubspot.com/t/why-does-my-custom-code-return-invalid-dates-in-hubspot/137238)._
