Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
please Help:
I select Month Rang from ( Feb to Aug ) on month field. And Year Rang From ( 2012 to 2015 ) in Year field
now I want to show first and last date from chosen range as:
First date : 01/02/2012
Last Date : 31/08/2015
Number Of days between first and last date = 1260 days
Hi Ghassan,
Try this
FirstDate = makedate(Min(Year),Min(Month),1)
LastDate = MonthEnd( makedate(Max(Year),Max(Month),1) )
Number of Days = interval(LastDate-FirstDate, 'D')
May be like this:
First Date - Min(Date)
Last Date - Max(Date)
Number of Days - Max(Date) - Min(Date)
Or perhaps Number of Days: Max(Date) - Min(Date) + 1
I try ...... not working
Not ( maybe ) and not ( perhaps )
any one have ( Sure correct answer )
Wow that's a very confusing response. What are you trying to say? Can you provide a sample?
Hi Ghassan,
Try this
FirstDate = makedate(Min(Year),Min(Month),1)
LastDate = MonthEnd( makedate(Max(Year),Max(Month),1) )
Number of Days = interval(LastDate-FirstDate, 'D')
Dear Thomas Moutault ................ Great correct answer --- Thank you
Dear Sunny.............................Sorry for my confusing response .. I apologize ..Thank you
If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post).