nsnhuang opened a new pull request, #24069:
URL: https://github.com/apache/doris/pull/24069

   ## Proposed changes
   
   Issue Number: #24068 
   
   <!--Describe your changes.-->
   add Func year_week_format
   Calculates the year and week number of a date and converts it to a string of 
the format type.
   
   The date param is a valid date. 
   The last three params are described as follows, using the default values if 
not specified (first_day_of_week=0, first_week_of_year_policy=0, 
format='%YWK%W') 
   Currently, strings of up to 16 bytes are supported, and NULL is returned if 
the return value is longer than 16 bytes.
   
   1. first_day_of_week:The starting week of the week, where 0 is Monday, 6 is 
Sunday, and so on.
   2. first_week_of_year_policy:How to determine the first week of the year, 
there are three strategies.
   strategies 0:The week of January 1 is the first week of the year.
   strategies 1:After January 1, the week in which the first week begins is the 
first week of the year.
   strategies 2:The first week longer than four days is the first week of the 
year.
   3. format: Specifies the output format for the date/datetime.
   
   format The following formats are available:
   
   %W | numbering of weeks, double-digit.
   
   %w | numbering of weeks, minimum one-digit, maximum double-digit.
   
   %Y | year, four figures.       
                              
   %y | year, Last two digits.
   
   %% | express %
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to