Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Is there an option to set stating day of the week to be Sunday

Is there an option to set stating day of the week to be Sunday

New Contributor

Hi

 

Is there an option to set stating day of the week to be Sunday so when calling  trunc(timestamp, string unit) with 'D' I will get the date of Sunday and not of Monday

 

This can be done in oracle if you set the NLS_TERRITORY or alike  but I could not find how to set it in impala

 

 

Regards,

 

Noam

3 REPLIES 3

Re: Is there an option to set stating day of the week to be Sunday

New Contributor

Hi , 

I have the same issue . Did you find a solution? 

Re: Is there an option to set stating day of the week to be Sunday

New Contributor

no still an issue for me :-(

Re: Is there an option to set stating day of the week to be Sunday

Master Collaborator

I created a JIRA on your behalf for the request https://issues.apache.org/jira/browse/IMPALA-5626. We don't have that support right now.

 

I think you can work around this in some cases, e.g. with trunc you can do some date arithmetic:

select trunc(cast('2017-07-03' as timestamp) + interval 1 day, 'DAY') - interval 1 day;