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

Date

HI all ,

In an expression iam trying to get the difference of thwo dates ..

Can please the expertise suggest me what iam doing is correct ..

num(Date(ManufacturedDate,'dd-MM-YYYY'))-num(Max(InvoiceDate))

Thanks in advance.....

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this for a shot

Date(ManufacturedDate,'DD-MM-YYYY')-Date(Max(InvoiceDate),'DD-MM-YYYY')

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

View solution in original post

6 Replies
Mark_Little
Luminary
Luminary

Hi John,

Could you supply a little more information on the problem.

Are the two dates linked on a one to one level?

Are they both the same date format?

What visual are you trying to add this to?

Something like you have above should work.

Mark

swuehl
MVP
MVP

Num() is a formatting function which you don't need if you want to subtract the resulting numbers.

Date() is also a formatting function.

Or are you maybe trying to interpret the text value in ManufacturedDate?

Then use Date#().

Is ManufacturedDate a unique value in the context of your expression evaluation?

In other words, do both parts of your calculation return a number when used per se?

smilingjohn
Specialist
Specialist
Author

Hi Stefan ,

My Manufacturing Date is as shown in the snapshot

Dateform.PNG

I want to subtract the Manufactre Date from The Max od Innovice date ....

Hiow do achieve this

I want to get the difference of Days

swuehl
MVP
MVP

What's the context of your expression? A chart with ??? dimensions?

How are all the fields used in dimensions / your expression related to another?

smilingjohn
Specialist
Specialist
Author

Striaght table with many dimensions  like .... Customer Name, Company , and so on ..and also there are other expression too ..

Everything is working fine ..but i am not able to get the the difference of days

Anil_Babu_Samineni

Try this for a shot

Date(ManufacturedDate,'DD-MM-YYYY')-Date(Max(InvoiceDate),'DD-MM-YYYY')

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