Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nagarjuna005
Contributor III
Contributor III

How to get min date from two date fileds

Hi ,

I have two fields like YO2 Date , EOB Date when YO2 Date<>'NULL' and EOB Date <>'NULL'

i have to get min date from YO2 Date and EOB Date .

so how to write an expression to get min date .

example :

IF(YO2 Date<>'NULL' and EOB Date <>'NULL') THEN i shoud get min date from YO2 AND EOB Dates.

can any one help on this thanks.

 

 

Labels (1)
4 Replies
OmarBenSalem

try :

date(min (total date))

sunny_talwar

May be this

RangeMin([YO2 Date], [EOB Date])

or

RangeMin(Min([YO2 Date]), Min([EOB Date]))
FelipeFuku
Partner - Contributor III
Partner - Contributor III

Hello Nagarjuna005,

Do you need to get ONE value that is min between the 2 dates, or you need both?

For both, try this...
=IF([
YO2 Date]<>Null() and [EOB Date] <>Null() ,  min( [YO2 Date] ) &' | '& min( [EOB Date] ) )

For one, try this..
=IF([YO2 Date]<>Null() and [EOB Date] <>Null() , 
     if ( min( [YO2 Date] ) > min( [EOB Date] ) ,  [YO2 Date] ,  [EOB Date] ) )

Fukumoto.

Brett_Bleess
Former Employee
Former Employee

You have received quite a few ideas on things, if any of them helped, please close out the thread for us by using the Accept as Solution button on any post(s) that helped you solve your issue.  If you did something different, consider posting that and then use the button to mark that post.  This will close the thread and let other Members know what worked and it gives credit to the posters for the help if something did work.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.