# Date field Invalid Input Value Field Key on Custom Action.

**URL:** <https://community.hubspot.com/t/date-field-invalid-input-value-field-key-on-custom-action/116007>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [September 9, 2024, 2:06pm UTC](https://community.hubspot.com/t/date-field-invalid-input-value-field-key-on-custom-action/116007 "2024-09-09T14:06:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FFochi](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@FFochi](https://community.hubspot.com/u/FFochi)\
**Post date:** [September 9, 2024, 2:06pm UTC](https://community.hubspot.com/t/date-field-invalid-input-value-field-key-on-custom-action/116007/1 "2024-09-09T14:06:50Z")

</div>

Hello,  
I’m using the custom workflow action API to trigger custom events on my analytics and messaging system.  
The issue I’m facing is that if I declare it as date and dateTime it returns as invalid input value field key when I select a date time property in Hubspot (in the example it’s the meeting start time from a meeting object).  
If I declare it as string, then it outputs only the date (DD/MM/YY) without the time.  
Either a unix timestamp or a string with DD/MM/YY HH:MM works for me.  
Can someone please help me out?

 ![FFochi_0-1725890612029.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/1/18892eac539f0de4dd9f1e55c4b768e7baf63540.png)

 ![FFochi_1-1725890625349.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/3/d302f4a08f76d93d4797fab0b3981159246b5c4f.png)

The field was declared as  
“typeDefinition”: {  
“name”: “Variable 11”,  
“type”: “datetime”,  
“fieldType”: “date”,  
“options”: [],  
“optionsUrl”: null,  
“referencedObjectType”: null,  
“externalOptions”: false,  
“externalOptionsReferenceType”: null  
},  
“supportedValueTypes”: [  
“STATIC\_VALUE”

---

<div class="post-metadata">

**Author:** ![KhushbooP11](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/khushboop11/32/8252_2.png) [@KhushbooP11](https://community.hubspot.com/u/KhushbooP11)\
**Post date:** [September 9, 2024, 2:41pm UTC](https://community.hubspot.com/t/date-field-invalid-input-value-field-key-on-custom-action/116007/2 "2024-09-09T14:41:25Z")

</div>

Hi @FFochi,

To fix the “Invalid Input Value Field Key” issue,

1. Declare the field as a string and convert the datetime to a Unix timestamp.

2. Alternatively, format the date as “DD/MM/YY HH:MM” and use it as a string.

These approaches should resolve the error and correctly capture the datetime.

I hope it helps, let me know if you need to [talk](https://calendly.com/khushboo-pokhriyal/30min?month=2024-08)!

Khushboo Pokhriyal

Growth & Operations

GroRapid Labs

[LinkedIn |](https://www.linkedin.com/in/khushboopokhriyal)9315044754 | [Email |](mailto:khushboo.pokhriyal@grorapid.com)[Website](https://www.grorapidlabs.com/)

---

<div class="post-metadata">

**Author:** ![FFochi](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@FFochi](https://community.hubspot.com/u/FFochi)\
**Post date:** [September 9, 2024, 2:56pm UTC](https://community.hubspot.com/t/date-field-invalid-input-value-field-key-on-custom-action/116007/3 "2024-09-09T14:56:47Z")

</div>

Hi @KhushbooP11  
Thank you for the answer.  
When I declare the variable as

`"type": "string","fieldType": "text"`

Hubspot automatically sends it as a string containing only “MM/DD/YY”, without the the HH:MM information.

 ![FFochi_0-1725894532634.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/e/5ed5b157499c3547871a6915b25c1adbdb5bc168.png)

Variable 11 here was declared as dateTime, but set manually in the workflow, while Variable 1 is a string from a datetime property.

 ![FFochi_1-1725894625112.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/6/56842b4e18ef403ccf28670e0fc074b894d9aaae.png)

 ![FFochi_2-1725894657396.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/3dc67d6de4605dc484e44cc514bdb786c67dce61.png)
