Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time difference in millisecond

Dear Team,

i am using interval function to get difference between two times in second/minutes/ and hour by below mention formaula

1) =interval(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff'),'s')      ANS : 3600

2) =interval(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff'),'mm')  ANS :  60

3) =interval(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff'),'hh')    ANS : 01

i want to get the difference in milliseconds like :

=interval(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff'),'fff')

Kindly let me know how can we do this.

Regards,

JKV

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use sfff as format string:

=interval(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff'),'sfff')


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use sfff as format string:

=interval(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff'),'sfff')


talk is cheap, supply exceeds demand
Not applicable
Author

See this

MarcoWedel
MVP
MVP

(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff')*86400000


Regards


Marco

MarcoWedel
MVP
MVP

(Timestamp#('12:00:00.010','hh:mm:ss.fff') - Timestamp#('11:00:00.010','hh:mm:ss.fff'))*86400000

Not applicable
Author

Thanks