Hi everyone,
I have database which has data of past 2 years.
I want to get that data for current financial year.
(Here financial year is 1st april to 31st of March)
This query returns data for current calender year i.e. [Jan-to-Dec]
SELECT DATENAME(MONTH, DATE) AS MonthName,
SUM(NetAMOUNT) AS dsfd from SALESMASTER
GROUP BY DATEPART(MONTH, DATE), DATENAME(MONTH, DATE)
ORDER BY DATEPART(MONTH, DATE)
I want to see the same data in the form of financial year i.e. [April-to-March]
just take care financial year involves 9 months of previous year and 3 months of current year.
please reply..