Hi,
i want to get current financial year months data, financial year starts from jul and ending jun.
CREATE table #test(FinancialDate date)
INSERT INTO #test
VALUES
('2017-12-31'),
('2017-11-30'),
('2017-10-31'),
('2017-09-30'),
('2017-08-31'),
('2017-07-31'),
('2017-06-30'),
('2017-05-31'),
('2017-04-30'),
('2017-03-31'),
('2017-02-28'),
('2017-01-31'),
('2016-12-31'),
('2016-11-30'),
('2016-10-31'),
('2016-09-30'),
('2016-08-31'),
('2016-07-31'),
('2016-06-30'),
('2016-05-31'),
('2016-04-30'),
('2016-03-31'),
('2016-02-29'),
('2016-01-31'),
('2015-12-31'),
('2015-11-30'),
('2015-10-31'),
('2015-09-30'),
('2015-08-31'),
('2015-07-31'),
('2015-06-30'),
('2015-05-31'),
('2015-04-30'),
('2015-03-31'),
('2015-02-28'),
('2015-01-31')
Expected result:
Jul 2016
Aug 2016
Sep 2016
Oct 2016
Nov 2016
Dec 2016
Thank you.