[
https://issues.apache.org/jira/browse/TRAFODION-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550147#comment-16550147
]
chenyunren commented on TRAFODION-3150:
---------------------------------------
Thanks Hans. Your comment is very useful!
Yes, I mainly compared to Oracle and Postgre_SQL_.
1.select extract(quarter from interval '99' month) from dual;
I think your are right.The result should also reflect the interval.
2.select to_char(date '2016-01-03','ww') from dual;
"week" means week number of year (1-53)
where week 1 starts on the first day of the year and continues to the seventh
day of the year (#1)
I know we have function week, which use Sunday as first day of a week. But I
think maybe it's(#1) more intuitive and more similar to Oracle and PG.
3. select to_char(time '00:00:01', 'hh12') from dual;
"hh12" means hour of day (01-12). So '00' is not the correct value.
> to_char and extract function's new options bug
> ----------------------------------------------
>
> Key: TRAFODION-3150
> URL: https://issues.apache.org/jira/browse/TRAFODION-3150
> Project: Apache Trafodion
> Issue Type: Bug
> Reporter: chenyunren
> Priority: Major
>
> 1.select extract(quarter from interval '99' month) from dual;
> return:33
> should return 1
> 2.select extract(week from date '2016-01-03') from dual;
> return:2
> should return 1
> 3.select to_char(date '2016-01-03','ww') from dual;
> return:2
> should return 1
> 4.select to_char(time '00:00:01', 'hh12') from dual;
> return:00
> should return 12
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)