Using the month() and day() formula result in a single digit number returning. eg: January = 1.
Is there a way to have a 2 digit value return for all?
eg: January=01
I'm trying to get a result of: 2014-01-15
concatenate(year({Month Ending}),"-",month({Month Ending}),"-",day({Month Ending}))
John McGarvey shared this idea · Jul 18, 2014
Comments
1 comment
Hi John,
To obtain a result like "2014-01-15", you will need to add some conditionals into your calculation. You could use:
year({Month Ending}) & "-" & if(month({Month Ending})<10,"0" & month({Month Ending}),month({Month Ending})) & "-" & if(day({Month Ending})<10, "0" & day({Month Ending}), day({Month Ending}))
This will output the way you are looking for in a calculated text field and will also return a valid date if you are using a calculated date field. Please let us know if you have any further questions.
Regards,
Jake
Please sign in to leave a comment.