Format date fields in Xporter

How can I format a date/time field in the Xporter plugin template?

For example, in my Word doc I have the field ${CreatedTime} which displays as 2012-10-15 12:48:51.853

I would like to be able to format the date so that it is displayed as October 15, 2012.

2 answers

1 accepted

0 votes
Answer accepted

Hi winbolton,

You can use javascript processing instructions for that.


%{var months = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); var dateParts = '${CreatedTime}'.split('-'); var month = dateParts[1]; var year = dateParts[0] ; var day = dateParts[2].split(' ')[0]; months[parseInt(month) - 1] + ' ' + day + ', ' + year;}

Check the attached template.


this would also be interesting for me.

I used the field ${CreatedDate} within a Xporter plugin and get e.g. the output


In the issue`s detail view, instead, i see

26. Jun 2013 (german date format).

Could you tell me how i apply this german date format onto the Xporter field ${CreatedDate} ?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


263 views 0 6
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you