MAKEDATE(2015, 6, 1) = #june 1, 2015#
or if date is today
My question is how will we select year for makedate. makedate(which_year,6,1)
Let me repeat my examples
e.g If 1st date is 1/July/2015 than 2nd date should be 1/june/2015.
If 1st date is 1/Jan/2016 than 2nd date should be 1/June/2015 and NOT 1/June/2016
we should get the date of last June that has passed.
Thanks msa s for ping.
Tharashasank Davuluru has already given you the solution how to get the datediff from two dates. However I'm giving you another way of getting datediff from past june and variable date(parameter date). Have a look. Workbook (version 9.2) attached below. Let us know your remarks.
Unable to attach the workbook
In both of your solutions we have fixed the reference dates and the 2nd date as variable.
So its straight forward to get the difference.
My question was, when we select 2nd date, then the 1st date would be in reference to the date selected.
My requirement is:
Difference of days between Sysdate(Current date) and June 1 that has last passed.
So here, June 1 (month and date) is fixed, but year is not fixed i.e. DD/MM/YYYY - 01/06/????
Let me give you example of my requirement.
If sysdate 01/08/2015 then => 01/06/2015
If Sysdate 01/01/2016 then => 01/06/2015