I would like to use automation to convert a string in the description into a date/time field. My description contains only the date and time in the following format: yyyy-MM-ddTHH:mm. There is nothing before or after it.
For example: 2026-03-09T18:34
I tried to get this string into my date/time field via Edit Issue using the following Smart Value: {{issue.description.toDate(“yyyy-MM-dd'T'HH:mm”)}}
Unfortunately, I don’t get any result. It simply doesn’t transfer anything to the field. However, if I insert a Log Action before it, I do get a result in the log.
Test: {{issue.description.toDate(“yyyy-MM-dd'T'HH:mm”)}}
Test: 2026-03-09T18:34:00.0+0000
Can someone tell me where I'm going wrong?
Hello @Kaja Iske
You are actually pretty close! You should include a small change with your smart value:
{{issue.description.toDate("yyyy-MM-dd'T'HH:mm").format("yyyy-MM-dd'T'HH:mm:ss.SSSZ")}}
Hi Nikola,
thanks for the hint! In principle, that works, but it then shifts the time back by an hour (19:34). Is there another solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then you need to adjust your smart value to:
{{issue.description.toDate("yyyy-MM-dd'T'HH:mm").convertToTimeZone("Europe/Vienna").jiraDateTime}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{{issue.description.toDate("yyyy-MM-dd'T'HH:mm").setTimeZone("Europe/Vienna").jiraDateTime}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
So it seems you effectively get a date out of the conversion. Try using this:
{{issue.description.toDate(“yyyy-MM-dd'T'HH:mm”).jiraDateTime}}
or
{{issue.description.toDate(“yyyy-MM-dd'T'HH:mm”).jiraDate}}
Here is the resource where I found this:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not if you pick the jiraDateTime option as mentioned above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.