Support Questions

Find answers, ask questions, and share your expertise

First day of current financial year Impala

New Contributor

Hi,

 

What would the code be to return the first day of the current financial year in Impala?

 

e.g. '01-APR-2019'

 

Thanks.

1 REPLY 1

New Contributor

Hi

 

This should help

 

select if((month(now()) in (1,2,3)),concat(cast((year(now())-1) as string),'-04-01'),concat(cast(year(now()) as string),'-04-01')) as first_date;