Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
areli1990
New Contributor

Dates

 

how I can subtract two dates format: ' DD / MM / YYYY hh : mm : ss [ .fff ] TT ' ) . ?

 

for example : 05/20/2016 3:49:24 PM - 5/18/2016 1:10:54 PM

 

 

I appreciate support

 

1 Solution

Accepted Solutions

Re: Dates

May be this:

Interval(TimeStamp#(Field1, 'D/M/YYYY hh:mm:ss TT') - TimeStamp#(Field2, 'D/M/YYYY hh:mm:ss TT'))

Or this if you want only days difference:

Date(Floor(TimeStamp#(Field1, 'D/M/YYYY hh:mm:ss TT'))) - Date(Floor(TimeStamp#(Field2, 'D/M/YYYY hh:mm:ss TT')))

2 Replies

Re: Dates

May be this:

Interval(TimeStamp#(Field1, 'D/M/YYYY hh:mm:ss TT') - TimeStamp#(Field2, 'D/M/YYYY hh:mm:ss TT'))

Or this if you want only days difference:

Date(Floor(TimeStamp#(Field1, 'D/M/YYYY hh:mm:ss TT'))) - Date(Floor(TimeStamp#(Field2, 'D/M/YYYY hh:mm:ss TT')))

areli1990
New Contributor

Re: Dates

Thank you very much for your support