Hello Team,
I am query regarding how to convert measure with number data type to time data type in the form of hh:mm::ss.
I have tried to achieve the desired format by using table calculation.
By using table calculation where here the filed is "number"
concat(floor(floor(${number}/60)/60),":", floor(${number}/60) - floor(floor(${number}/60)/60)*60, ":", ${number}-(floor(${number}/60)*60))
By using LookML code(sample code) also we can achieve this
dimension: number {
type: number
sql: 3600;;
}
measure: number_to_time{
sql:concat(floor(floor(${number}/60)/60),":", floor(${number}/60) - floor(floor(${number}/60)/60)*60, ":", ${number}-(floor(${number}/60)*60)) ;;
}
Here the output will be --> 1:0:0
May I know how to achieve the same in time data type, where the above data type is string data type as output.