-
Decimal Places by Condition
Table Example
start_date val ---------------------------------------- 2022.05.02D07:36:35.901000000 0.01 2022.05.02D07:36:36.341000000 0.0125 2022.05.02D07:36:36.756000000 0.01234568 2022.05.02D07:36:37.204000000 0.9999 2022.05.02D07:36:37.636000000 0.008
Desired Result
start_date val ---------------------------------------- 2022.05.02D07:36:35.901000000 0.01 2022.05.02D07:36:36.341000000 0.013 2022.05.02D07:36:36.756000000 0.012 2022.05.02D07:36:37.204000000 1 2022.05.02D07:36:37.636000000 0.008
I tried follows.
@[meter;`val;.Q.f[3]'] start_date val ------------------------------------- 2022.05.02D07:36:35.901000000 "0.010" 2022.05.02D07:36:36.341000000 "0.013" 2022.05.02D07:36:36.756000000 "0.012" 2022.05.02D07:36:37.204000000 "1.000" 2022.05.02D07:36:37.636000000 "0.008"
How do I create a function to represent the desired result?
The P is set to zero.
Log in to reply.