Usage custom date field in xporter template

Lilian Brouwer March 12, 2024

I try to get a custom date field into the xporter instead of the current date. Do I make de right discission if I try it like this: ${dateformat(“MMM dd, yyyy”):${Kwalificatie Datum}}

 

2 answers

1 accepted

2 votes
Answer accepted
Lilian Brouwer March 12, 2024

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

0 votes
Lilian Brouwer March 12, 2024

Or should I use a different date format for it. If I only put in the custom field I get the full date including time, which I don't want

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events