Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

round off

Hi all,

I am still facing the issue with the format.

I have written this in script

num(floor( duration)/3600,'##.##') as  mytime,

duration in seconds. 

but I need  to show with two decimal

am getting output like below    I need  1274.62  like that

   

1274.621667
1012.946389
30 Replies
soniasweety
Master
Master
Author

syntax error it showing

soniasweety
Master
Master
Author

still same no luck

sunny_talwar

My bad, try this

Interval(Floor(Now() - cmDate, 1/24), 'hh') as lefttime

Anil_Babu_Samineni

I am getting 854? Not correct

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
PrashantSangle

Hi,

Simple num#() will do the trick.

num#(Interval(Now()-cmDate,'hh'),'#')


Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
soniasweety
Master
Master
Author

no luck sunny still same

sunny_talwar

Can you share screenshots?

Kushal_Chawda

try this

round(mod(floor((Now()-cmDate)*24*60*60),86400) /3600,0.01)

soniasweety
Master
Master
Author

its not working

1274.62   instead of this  giving  1.02  like that all values

Kushal_Chawda

Can you give me one example? above logic will calculate total hours only between two dates