The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Date via API

Gary.Smith
Contributor
August 5, 2021

I've gone through a 100 posts about date but can't work this out. 

When i GET from the API the date is in format 2021-12-01 but it doesn't accept it when using POST.

Anyone know what format it should be in? It's a date field not datetime

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Mohamed Benziane
Community Champion
August 5, 2021

Hi,

As noted in the documentation, for a Date picker custom field this should be something like that:

"customfield_11441" : "2015-11-18"

For a date system field 

"duedate" : "2015-11-18"

Can you share your code please and the error message.

Gary.Smith
Contributor
August 5, 2021

It was late and I am dumb.. I forgot to convert it to string.

 


$Get-Date $($LeaseInfo.'Start Date'-Format 'yyyy-MM-dd' ).ToString()

 

TAGS
AUG Leaders

Atlassian Community Events