从XML提取时间部分以插入Oracle [英] Extract time part from XML to insert in Oracle

查看:134
本文介绍了从XML提取时间部分以插入Oracle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


这是我在论坛上的第一篇文章.

我有一个没有栏目的xml文件.其中一首是这样的:

Hi,
This is my first post in the forum.

I have an xml file with no of coloumns. One of the coloumn looks like this:

<INVOICE_TIME> 1899-12-30T16:26:00+04:00 </INVOICE_TIME>


当我尝试将此值存储在Oracle数据库中时,它仅显示日期部分,即30-DEC-99.
我只想显示时间部分.


When I try to store this values in Oracle database, it show only a date part ie.30-DEC-99.
I want to display only time part. How can i do it?

推荐答案

在oracle中存储时间不是一件容易的事,您不能将时间存储为字符串类型nchar或类似的东西吗?
Storing time in oracle isn''t an easy task, could you not store the time as a string type nchar or something similar?


得到答案

Cdate(Format(INVOICE_TIME,"hh:mm:ss")as INVOICE_TIME1
got the answer

Cdate(Format(INVOICE_TIME,"hh:mm:ss") as INVOICE_TIME1


这篇关于从XML提取时间部分以插入Oracle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆