linux 时间戳 转date:
 
创建自定义函数:
create or replace function unix_to_oracle(in_number number) return date is
begin
return (to_date('','yyyymmdd') + in_number/86400
+ to_number(substr(tz_offset(sessiontimezone),1,3))/24); end unix_to_oracle;
 使用:

select unix_to_oracle(1509490525) from dual;

 
 
date 转linux时间戳:
 
create or replace function oracle_to_unix(in_date in date) return number is
begin
return ((in_date-to_date('','yyyymmdd'))*86400 -
to_number(substr(tz_offset(sessiontimezone),1,3))*3600);
end oracle_to_unix;
 使用:
select oracle_to_unix(sysdate) from dual;

oracle unix时间戳与date转换的更多相关文章

  1. MySql 格式化时间(包括正常时间格式与unix时间戳的互相转换)

    函数:FROM_UNIXTIME 作用:将MYSQL中以INT(11)存储的时间以"YYYY-MM-DD"格式来显示.语法:FROM_UNIXTIME(unix_timestamp ...

  2. oracle将unix 时间戳转换为date类型

    select to_date('19700101','yyyyMMdd')+numtodsinterval(8*3600,'second')+numtodsinterval(60,'second') ...

  3. c# datetime与 timeStamp(unix时间戳) 互相转换

    /// <summary> /// Unix时间戳转为C#格式时间 /// </summary> /// <param name="timeStamp" ...

  4. java 时间戳与date转换

    1.时间戳转换为date long sjc=1442633777; SimpleDateFormat t = new SimpleDateFormat("yyyyMMddHHmmss&quo ...

  5. oracle中时间戳转为Date类型的数据

    问题描述: 一个表中原本应该存放date类型的数据,但是不知道之前哪位大仙把两个字段的类型建成了NUMBER类型的了,这样在后台看时间肯定不方便.现在需要改成date类型,但是现在库中是有数据的,不能 ...

  6. MySQL(Unix时间戳、日期)转换函数

    unix_timestamp() mysql> select unix_timestamp(); +------------------+ | unix_timestamp() | +----- ...

  7. Oracle视图时间戳转为Date

    CREATE OR REPLACE VIEW PDAORDER AS SELECT po.id id, po.order_no AS order_no, po.money AS money, (SEL ...

  8. oracle 根据时间戳查询date类型sql

    话不多说上sql: select to_char(1574837126879/(1000*60*60*24)+to_date('1970-01-01 08:00:00','YYYY-MM-DD HH2 ...

  9. 将Unix时间戳转换为Date、Json属性动态生成反序列化、序列化指定属性

    实体类 public class Test { [JsonIgnore] public string GetDate { get { return GetTime.ToString("yyy ...

随机推荐

  1. Hadoop特点

    一:HDFS 1.HDFS上传数据,会将文件切分成指定大小的数据块,并以多副本的数据块存储在机器上. 2. part0是指  副本有2个而且1,2有两个副本 二.YARN 1.负责整个集群的管理和调度 ...

  2. selector 选择器

    布局文件中: <ImageView android:id="@+id/image_message" android:layout_width="40dp" ...

  3. 【模型】Toon Dragon

    下载地址:点击下载

  4. easyui的dialog

    代码: <div id="titledialos" class="easyui-dialog" title="×××" data-op ...

  5. AngularJS——第3章 指令

    第3章 指令 所谓指令就是AngularJS自定义的HTML属性或标签,这些指令都是以ng-做为前缀的,例如ng-app.ng-controller.ng-repeat等. 3.1 内置指令 ng-a ...

  6. 10.18JS日记

    1.JS的本质就是处理数据,数据来自后台的数据库,所以变量起到了临时存储的作用, ES制定了js的数据类型 2.数据类型有哪些? (1)字符串 String (2)数字  Number (3)布尔 B ...

  7. auth 认证模块

    . auth认证模块: http://www.cnblogs.com/liwenzhou/p/9030211.html auth模块的知识点: . 创建超级用户 python manage.py cr ...

  8. c#设计模式3抽象工厂模式(Abstract Factory)

    #region 坦克系列 abstract class Tank { abstract public void Go(); } /// <summary> /// 越野车 /// < ...

  9. (转)wcf项目程序调试

    由于使用分布式开发,因此在调试时,要分为客户端调试和服务端调试两种情况,下面就对这两种情况的调试步骤分别加以详细说明  调试客户端的页面代码 当仅仅需要调试客户端代码时,按照以下步骤进行操作: 1. ...

  10. IntelliJ idea 的破解

    ·1.破解的jar包下载链接: https://pan.baidu.com/s/1JV6GwguGQNs5pNQtst29Hw  提取码: u2jd 2.安装和破解地址:https://www.cnb ...