Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confiform: Formatting dates pulled from Jira

I have a Confiform in Confluence that is populating fields based on information in a Jira ticket based on the Key the user fills in.

One of the fields is pulling in the Created Date which in Jira has the format dd/MMM/' 'yy HH:mm PM

We only want the date portion, but no matter how I use the "formatDate" function, or the "convertDate" function it won't pull the information into Confluence.

If I don't format it, I just put fields.created it populates the field in the form as: yyyy-MM-ddT16:28:02.860-0500

If I do try to format it, it leaves the field blank.

Any ideas on what I'm doing wrong or how I can pull just the date portion of the information from Jira?

1 answer

1 accepted

Hi

Yes, there is a bit of a confusion ConfiForms is having and you need to help it with a parseDate function and Jira format for date/time field

fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ)

Then you can either format it or extract a timestamp

fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).formatDate(yyyy-MM-dd)
fields.created.parseDate(yyyy-MM-dd'T'HH:mm:ss.SSSZ).timestamp

Hope it helps

Alex 

You Sir are a God.

Thank you so much, this is now working flawlessly.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

177 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you