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: 

Unparseable date returned from standard JIRA datetime picker

Yan Ioffe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2019

I need to grab a value from datetime picker field using postfunction using issue.getCustomFieldValue method in one of the workflows and then load that same exact date value into issue input parameter (issueInputParameters.addCustomFieldValue) to create andother issue in a different project. 

The problem is that source field data is returned as: "2019-01-16 13:37:00.0" and all my attempts to parse or format this string into the date format that Jira accepts fail with "unparseable date" message. 

Is there a way to convert this string into date in one line without adding code for removing the trailing ".0" and then parsing date and time substrings separately and then concatenating back together? 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Vineela Durbha
Contributor
January 29, 2019

Hi @Yan Ioffe

Did you  get the solution for the above. I am even stuck at the same place where I am unable to remove that .0 while trying to load the issueinputparameters.

Appreciate your help on the same