[ https://issues.apache.org/jira/browse/TRAFODION-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anoop Sharma reassigned TRAFODION-2979: --------------------------------------- Assignee: Anoop Sharma > Enhance to_date and support transfering string to timestamp with millseconds > ---------------------------------------------------------------------------- > > Key: TRAFODION-2979 > URL: https://issues.apache.org/jira/browse/TRAFODION-2979 > Project: Apache Trafodion > Issue Type: Improvement > Components: sql-general > Affects Versions: 2.1-incubating > Reporter: Yuan Liu > Assignee: Anoop Sharma > Priority: Major > > I know we can transfer a string to timestamp using to_date, to_timestamp or > cast(.. as timestamp) > > Now I have a string 20160912100706259067 and want to transfer to timestamp > with millseconds. The only way I can think is firstly changing the value to > 2016-09-12 10:07:06.259067 and then using to_timestamp('2016-09-12 > 10:07:06.259067'). Is there any better way? > > In Oracle, it supports TO_TIMESTAMP('20160912100706259067', > 'YYYYMMDDHH24MISSFF6'), it seems we can not support it. > > Currently to_date in Trafodion can only support below format, > * 'YYYY-MM-DD' > * 'MM/DD/YYYY' > * 'DD.MM.YYYY' > * 'YYYY-MM' > * 'MM/DD/YYYY' > * 'YYYY/MM/DD' > * 'YYYYMMDD' > * 'YY/MM/DD' > * 'MM/DD/YY' > * 'MM-DD-YYYY' > * 'YYYYMM' > * 'DD-MM-YYYY' > * 'DD-MON-YYYY' > * 'DDMONYYYY' > * 'YYYYMMDDHH24MISS' > * 'DD.MM.YYYY:HH24.MI.SS' > * 'YYYY-MM-DD HH24:MI:SS' > * 'YYYYMMDD:HH24:MI:SS' > * 'MMDDYYYY HH24:MI:SS' > * 'MM/DD/YYYY HH24:MI:SS' > * 'DD-MON-YYYY HH:MI:SS' > * 'MONTH DD, YYYY, HH:MI' > * 'DD.MM.YYYY HH24.MI.SS' > > We need add more fomat to include millseconds such as 'YYYYMMDDHH24MISSFF6' > The format of millseconds could be FF [1..9] > -- This message was sent by Atlassian JIRA (v7.6.3#76005)