Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use the first of two dates

I have two dates of receipt for material. I use Concat to get them both to show in the field. However, I need to do my calculations using just the first date.

First I have -[Confirmation Date] gives me one date (Ex. 2015-09-15)

Then =Concat (DISTINCT [Posting Date],' / ')   gives me two dates (Ex. 2015-09-15 / 2015-09-21)

In the third column I need to subtract the first of the two posting dates from the confirmation date.

How would I write this?

1 Solution

Accepted Solutions
maxgro
MVP
MVP

may be

min([Posting Date] - [Confirmation Date])

View solution in original post

7 Replies
kiranmanoharrode
Creator III
Creator III

Hello James,

= Ceil(Num([Posting Date]) - Num([Confirmation Date]))

It will give you the output in No. of days.

Regards,

Kiran

Not applicable
Author

If I understand, you are looking for the number of days between the posting date and confiramtion date?

In the above example you want to subtract 2015-09-15 - 2015-09-21 or is it the other way around?

You are building the concatenated fied based on the 2 individual fields so you should be able to subtract ehe indivdula fields (see Kiran response)

Anonymous
Not applicable
Author

Thanks for the quick reply, but it still did not work. I still get a null in the on time,

maxgro
MVP
MVP

may be

min([Posting Date] - [Confirmation Date])

pamaxeed
Partner - Creator III
Partner - Creator III

Hi,

to get the first Posting Date use subfield([Posting Date], '/', 1)

so try something like that:

date(subfield(Concat (DISTINCT [Posting Date],' / ') , '/', 1), 'YYYY-MM-DD') - [Confirmation Date]

Patric

Anonymous
Not applicable
Author

That Got it. Thank you very much.

MarcoWedel

please post sample data/application to demonstrate with.

regards

Marco