What is the virtual column expression to convert Duration column of 00:00:00 into โ0 h 00 minโ removing the seconds.
Thanks!
Solved! Go to Solution.
Thanks @Suvrutt_Gurjar
The final expression I landed on was this. Always a big help.
IF(
HOUR([DURATION])=0,
CONCATENATE(MINUTE([DURATION]), " min"),
IF(
HOUR([DURATION])>0,
CONCATENATE(HOUR([DURATION]), "h โ, MINUTE([DURATION]), " minโ), โโ)
)
@Tony_Insua
If you expand the Virtual Columnโs details, you will notice the Ignore Seconds setting to turn it off.
Also:
@LeventK thanks. Iโm looking to keep the seconds to show 00:00:00 format in the detail view only; however, in my card view, I would like to display โ0h 00mโ this way which I believe is a separate VC expression to convert my DURATION column.
@Steve Iโm having issues with the expression as I donโt see it the โ0h 00mโ example on this help guide.
Iโve tried:
TEXT([DURATION], โH:Mโ), using the [DURATION] column for when.
Result: something went wrong:
Unable to cast object of type โSystem.TimeSpanโ to type โSystem.IConvertibleโ.
As mentioned in the article on TEXT() shared by @Steve, I believe the TEXT() works on Date , DateTime , or Time
You may need to convert the [Duration] to time value. Please try with
TEXT(TIME([Duration]), โHH:MMโ)
Another option could be
CONCATENATE(HOUR([Duration]), " h", MINUTE([Duration]), " min")
Thanks @Suvrutt_Gurjar
The final expression I landed on was this. Always a big help.
IF(
HOUR([DURATION])=0,
CONCATENATE(MINUTE([DURATION]), " min"),
IF(
HOUR([DURATION])>0,
CONCATENATE(HOUR([DURATION]), "h โ, MINUTE([DURATION]), " minโ), โโ)
)
Excellent.
Similar:
CONCATENATE(
IFS(
(HOUR([Duration]) > 0),
(HOUR([Duration]) & "h ")
),
(MINUTE([Duration]) & " min")
)
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |