Getting a DATEDIFF result in M,D format :thread:
# gooddata-ui
b
Getting a DATEDIFF result in M,D format 🧵
Hello team, We are an HR software and we want to calculate the duration of an active contract. Our clients want to show this duration in months, days, eg: 2m, 23d 4m, 12d etc.
I have managed to calculate the duration in days or in months, but cannot achieve what I want. Can you help?
m
Hi Bryan, you can customize the format of the numbers - Unit conversion allows you to implement simple arithmetics to format metrics into various display outputs such as duration or length. More details can be found here: https://www.gooddata.com/docs/cloud/create-metrics/format-numbers/#FormatNumbers-UnitConversioninMetricFormatting Hope this helps!
m
Hi Byron, we’re just wondering if you've had a chance to review my colleague's latest update. Please let us know if you still need any further assistance.
b
Hello - what happens if I just want to format a date in a visualisation without using a metric?