Oracle将RAW转换为日期格式 [英] Oracle convert RAW to date format
本文介绍了Oracle将RAW转换为日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Oracle数据库中有一个RAW字段,代表系统中注册用户的日期.
I have a RAW field in my Oracle database that represents the date of user registered in system.
该值类似于24E2321A0000000000
,但是我需要将该值转换为其表示的日期(例如2008-12-25 15:04:31).
The value is something like 24E2321A0000000000
However I need convert the value to the date it represents (etc 2008-12-25 15:04:31).
我尝试了totimestamp
(请参见此sqlfiddle ),但是没有不行.
I tried with totimestamp
(see this sqlfiddle) but that didn't work.
推荐答案
请尝试一个
declare
d date;
begin
dbms_stats.convert_raw_value (hextoraw('7876070A010101'), d);
dbms_output.put_line (d);
end;
这篇关于Oracle将RAW转换为日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文