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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between dates

Hi,

I got 2 date fields:

- "Dt End"

- "Dt Start"

Which are in the xls format:

Dt End 40820,50326

Dt Start 40820,01286

I need to create a new filed which reports the difference between this dates in terms of numbers of days.

I used this: Interval ("Dt End"-"Dt Start",'DD') as "Giorni"

But is not working properly..it gave me results formatted in days but is seems is having decimals (not expressed) so i got lots 00,01,02,03,04 but i need them as unique values

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

You can also try:

daystart("Dt End")-daystart("Dt Start")

or

Floor("Dt End"-"Dt Start",'DD')

or

Ceil( Interval ("Dt End"-"Dt Start",'DD'))

or

Round( Interval ("Dt End"-"Dt Start",'DD'))

Hope this helps,

Erich

View solution in original post

3 Replies
Not applicable
Author

networkdays will be perfect but i need to include also non-working days

m_woolf
Master II
Master II


Try:

floor("Dt End")-floor("Dt Start")

erichshiino
Partner - Master
Partner - Master

You can also try:

daystart("Dt End")-daystart("Dt Start")

or

Floor("Dt End"-"Dt Start",'DD')

or

Ceil( Interval ("Dt End"-"Dt Start",'DD'))

or

Round( Interval ("Dt End"-"Dt Start",'DD'))

Hope this helps,

Erich