Hi @ASHMITP ,
Please refer below:
create table #temptable
(TempDate date)
insert into #temptable values
('2019-03-01'),
('2020-06-01'),
('2021-08-01')
select iif(MONTH(TempDate)>6,cast(year(TempDate) as char(4))+'/'+cast(year(TempDate)+1 as char(4)),
cast(year(TempDate)-1 as char(4))+'/'+cast(year(TempDate) as char(4))) AS FinancialYear
from #temptable
Output:
FinancialYear
2018/2019
2019/2020
2021/2022
Best regards,
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.