Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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;

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.