数字格式 SQL 中的 Oracle 时间戳
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15614355/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle timestamp in number format SQL
提问by Sripaul
I have my datetime column in table defined as Oracle NUMBER data type which contains data in this format 1363709957 for example.
例如,我将表中的日期时间列定义为 Oracle NUMBER 数据类型,其中包含这种格式的数据 1363709957。
I want to get these numbers in query so i can execute my insert scripts which will put in current time in there. What is the oracle SQL for that?
我想在查询中获取这些数字,以便我可以执行我的插入脚本,这些脚本将在那里输入当前时间。什么是oracle SQL?
回答by Peter Wooster
Your time stamp appears to be a standard Unix time stamp. You need to use arithmetic to convert this here's a post on OTN about this,
您的时间戳似乎是标准的 Unix 时间戳。您需要使用算术来转换这里是 OTN 上关于此的帖子,