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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Between Difference

Dear All,

I'm new in qlikview. Can you tell me how can i find out difference between two date.

Exp: FromDate: 01/02/2015

To Date : 07/02/2015 .. Result will be: 7

Regards,

Masba

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

=Interval(date#(07022015,'DDMMYYYY')-date#(01022015,'DDMMYYYY'),'d')

Regards,

Laxmi

View solution in original post

9 Replies
amit_saini
Master III
Master III

Masba,

Try this:

Interval(Today()-Date(Date#([Due Date for Released Design],'MMM, DD YYYY' )),'d')  as NoOfDays,

where MMM, DD YYYY-> should be your date format.

Thanks

AS

amit_saini
Master III
Master III

Interval(Today()-Date(Date#(Your_date_Field,'MMM, DD YYYY' )),'d')  as NoOfDays,

Thanks,
AS

Anonymous
Not applicable
Author

=Interval(date#(07022015,'DDMMYYYY')-date#(01022015,'DDMMYYYY'),'d')

Regards,

Laxmi

Not applicable
Author

Dear Amit,

Thanks for your reply.. I have two date fields.. One is "PO_DATE" and another is "Invoice_DATE". how can i add two fields in your formula..

Interval(Today()-Date(Date#(Your_date_Field,'MMM, DD YYYY' )),'d')  as NoOfDays

jyothish8807
Master II
Master II

Hi Masba,

TRy like this:

=Interval(date#(PO_DATE,'DDMMYYYY')-date#(Invoice_DATE,'DDMMYYYY'),'d')

or

=Ceil(Interval(Date#(PO_DATE, 'MM/DD/YYYY') - Date#(Invoice_DATE, 'MM/DD/YYYY'), 'DD' ))

Regards

KC

Best Regards,
KC
Not applicable
Author

Dear Laxmi Kuber,

Thanks a lot for your reply..

Not applicable
Author

Hi,

interval(PO_DATE-Invoice_DATE,'DD')         difference will be in Days

interval(PO_DATE-Invoice_DATE,'DD:hh:mm')   result will be in Days,hours and minuts

if you face any problem then convert both date into number format and then use interval .

like   =>   num(PO_DATE) as PO_DATE

Regards

Vimlesh

amit_saini
Master III
Master III

Than it should be like below:

Interval(Date(Date#(PO_DATE, 'MMM, DD YYYY'))-Date(Date#(Invoice_DATE,'MMM, DD YYYY' )),'d')

Thanks,

AS

PrashantSangle

Hi,

Use expression given by Amit

instead of Today() write to_date_fieldName

and Your_date_field write FromDate

Regards

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 🙂