You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by "Liu, Yuan (Yuan)" <yu...@esgyn.cn> on 2018/03/05 09:30:02 UTC
Can Trafodion support transfer string to timestamp with millseconds?
Hi Trafodioneers,
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.
Best regards,
Yuan
RE: Can Trafodion support transfer string to timestamp with
millseconds?
Posted by "Liu, Yuan (Yuan)" <yu...@esgyn.cn>.
Thanks Dave.
Jira https://issues.apache.org/jira/browse/TRAFODION-2979 has been created.
Best regards,
Yuan
From: Dave Birdsall <da...@esgyn.com>
Sent: Tuesday, March 06, 2018 12:18 AM
To: user@trafodion.apache.org; dev@trafodion.apache.org
Subject: RE: Can Trafodion support transfer string to timestamp with millseconds?
Hi,
Please write a JIRA asking for this feature. It would be simple to enhance Trafodion's TO_TIMESTAMP function to support this.
In the meantime, casting to TIMESTAMP should do the trick. That is the ANSI-standard syntax for this feature.
Dave
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn]
Sent: Monday, March 5, 2018 1:30 AM
To: dev@trafodion.apache.org<ma...@trafodion.apache.org>; user@trafodion.apache.org<ma...@trafodion.apache.org>
Subject: Can Trafodion support transfer string to timestamp with millseconds?
Hi Trafodioneers,
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.
Best regards,
Yuan
RE: Can Trafodion support transfer string to timestamp with
millseconds?
Posted by "Liu, Yuan (Yuan)" <yu...@esgyn.cn>.
Thanks Dave.
Jira https://issues.apache.org/jira/browse/TRAFODION-2979 has been created.
Best regards,
Yuan
From: Dave Birdsall <da...@esgyn.com>
Sent: Tuesday, March 06, 2018 12:18 AM
To: user@trafodion.apache.org; dev@trafodion.apache.org
Subject: RE: Can Trafodion support transfer string to timestamp with millseconds?
Hi,
Please write a JIRA asking for this feature. It would be simple to enhance Trafodion's TO_TIMESTAMP function to support this.
In the meantime, casting to TIMESTAMP should do the trick. That is the ANSI-standard syntax for this feature.
Dave
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn]
Sent: Monday, March 5, 2018 1:30 AM
To: dev@trafodion.apache.org<ma...@trafodion.apache.org>; user@trafodion.apache.org<ma...@trafodion.apache.org>
Subject: Can Trafodion support transfer string to timestamp with millseconds?
Hi Trafodioneers,
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.
Best regards,
Yuan
RE: Can Trafodion support transfer string to timestamp with
millseconds?
Posted by Dave Birdsall <da...@esgyn.com>.
Hi,
Please write a JIRA asking for this feature. It would be simple to enhance Trafodion's TO_TIMESTAMP function to support this.
In the meantime, casting to TIMESTAMP should do the trick. That is the ANSI-standard syntax for this feature.
Dave
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn]
Sent: Monday, March 5, 2018 1:30 AM
To: dev@trafodion.apache.org; user@trafodion.apache.org
Subject: Can Trafodion support transfer string to timestamp with millseconds?
Hi Trafodioneers,
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.
Best regards,
Yuan
RE: Can Trafodion support transfer string to timestamp with
millseconds?
Posted by Dave Birdsall <da...@esgyn.com>.
Hi,
Please write a JIRA asking for this feature. It would be simple to enhance Trafodion's TO_TIMESTAMP function to support this.
In the meantime, casting to TIMESTAMP should do the trick. That is the ANSI-standard syntax for this feature.
Dave
From: Liu, Yuan (Yuan) [mailto:yuan.liu@esgyn.cn]
Sent: Monday, March 5, 2018 1:30 AM
To: dev@trafodion.apache.org; user@trafodion.apache.org
Subject: Can Trafodion support transfer string to timestamp with millseconds?
Hi Trafodioneers,
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.
Best regards,
Yuan