[ 
https://issues.apache.org/jira/browse/TRAFODION-3127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16534587#comment-16534587
 ] 

ASF GitHub Bot commented on TRAFODION-3127:
-------------------------------------------

GitHub user kakaxi3019 opened a pull request:

    https://github.com/apache/trafodion/pull/1632

    [TRAFODION-3127] tochar enhancement

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kakaxi3019/trafodion trafodion-3127

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1632.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1632
    
----
commit 5c2c5d245d3a63bb368615d173be71fa1ebb1846
Author: kakaxi3019 <jupiter3019@...>
Date:   2018-07-06T08:46:29Z

    tochar enhancement

----


> to_char enhancement
> -------------------
>
>                 Key: TRAFODION-3127
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3127
>             Project: Apache Trafodion
>          Issue Type: Improvement
>            Reporter: chenyunren
>            Assignee: chenyunren
>            Priority: Major
>
> |Pattern|Description|EXP.|
> |HH|  hour of day (00-23)|TO_CHAR (TIME '23:05:10','HH')
>  result:23|
> |HH12|  hour of day (01-12)|TO_CHAR (TIME '23:05:10','HH')
>  result:11|
> |HH24|hour of day (00-23)|TO_CHAR (TIME '23:05:10','HH')
>  result:23|
> |MI|minute (00-59)|TO_CHAR (TIME '23:05:10','MI')
>  result:05|
> |SS|second (00-59)|TO_CHAR (TIME '23:05:10','SS')
>  result:10|
> |YYYY|year (4  digits)|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','YYYY')
>  result:2016|
> |Y|Last digit of the year (0-9)| TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','Y')
>  result:6|
> |YY|Last two digits of the year (00-99)| TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','YY')
>  result:16|
> |YYY|Last three digits of the year (000-999)| TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','YYY')
>  result:016|
> |MON|month(3 chars in English)|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','MON')
>  result:MAR|
> |MM|month(01-12)|TO_CHAR(DATE '2006-12-01','MM')
>  result:12|
> |DY|name of day(3 chars in English) |TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','DY')
>  result:TUE|
> |DAY|Name of day, padded with blanks to length of 9 characters. 
> SUNDAY|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','DY')
> result:TUESDAY|
> |CC|century|TO_CHAR (TIMESTAMP '2016-03-01 12:05:10','CC')
>  result:21|
> |D|day of week(Sunday (1) to Saturday (7))|TO_CHAR (TIMESTAMP '2016-03-01 
> 12:05:10','D')
>  result:3|
> |DD|day of month(01-31)|TO_CHAR(DATE '2006-12-01','DD')
>  result:01|
> |DDD|day of year(1-366)|TO_CHAR(DATE '2006-12-01','DDD')
>  result:335|
> |W|week of month(1-5)|TO_CHAR(DATE '2006-12-31','W')
>  result:5|
> |WW|week number of year(1-53).The first week starts on the first day of the 
> month.|TO_CHAR(DATE '2006-01-02','WW')
>  result:01|
> |J|Julian day (number of days since January 1, 4713 BC)|TO_CHAR(TIMESTAMP 
> '2001-01-07 00:00:00','J')
>  result:2451917|
> |Q|The quarter of the year (1 - 4)|TO_CHAR(DATE '2006-12-01','Q')
>  result:4|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to