Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Select a date whose between 2 variables

Hi

I have the column DATE_SALAIRE that contains few dates in format dd/mm/yyyy

I have created 2 date variables, that the user have to indicate :

vDateSelectDebut

vDateSelectFin

I want to do the sum of the column MARGE_HT_FACTURATION where DATE_SALAIRE<=vDateSelectDebut and DATE_SALAIRE>=vDateSelectFin

I have tested

=SUM({<DATE_SALAIRE={'>=$(vDateSelectDebut)', DATE_SALAIRE={'<=$(vDateSelectFin)' }} MARGE_HT_FACTURATION)

but it doesn't return me the both conditions together but if just one of them is checked

For example, if

vDateSelectDebut = 01/01/2012

vDateSelectFin = 30/06/2012

I want to select the lines where DATE_SALAIRE between 01/01/2012 and 30/06/2012

Help please

Thanks

Laurent

1 Solution

Accepted Solutions
MayilVahanan

HI

     Try like this,

    

=SUM({<DATE_SALAIRE={'>=$(vDateSelectDebut)<=$(vDateSelectFin)' }>} MARGE_HT_FACTURATION)

Both variables are in same format..

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

1 Reply
MayilVahanan

HI

     Try like this,

    

=SUM({<DATE_SALAIRE={'>=$(vDateSelectDebut)<=$(vDateSelectFin)' }>} MARGE_HT_FACTURATION)

Both variables are in same format..

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.