I'm trying to convert decimal timestamp in milliseconds to mm:ss.SSS . The method only works for integers, and the output is not what I desired:
select from_unixtime(cast(1911.13/1000 as bigint), 'mm:ss.SSS');
1911.13 milliseconds yields the output, 00:01.000, which is not correct, should be 00:01.911
I have tried to convert to double, but received errors
select from_unixtime(cast(1911.13/1000 as double), 'mm:ss.SSS');
error:[Code: 10014, SQL State: 42000] Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments ''mm:ss.SSS'': No matching method for class org.apache.hadoop.hive.ql.udf.UDFFromUnixTime with (double, string). Possible choices: FUNC(bigint) FUNC(bigint, string) FUNC(int) FUNC(int, string)
Any help will be appreciated!
