select to_date('17000101000000','YYYYMMDDHH24MISS')+1194710400000/(24*3600) from dual;
to_char('1194710400000','yyymmddhh24miss')直接转
我是用程序解决的: SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh-mm-ss"); Date date = new Date(); date.setTime(1194710400000L); System.out.println(format.format(date));我想问的是在oracle数据库中能不能不用程序函数,就将所有的时间戳转换成yyyy-MM-dd hh-mm-ss类型时间,而不是一条一条的转换?
select to_char( to_date('17000101000000','YYYYMMDDHH24MISS'),'yyyy-mm-dd hh24:mi:ss') from dual
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh-mm-ss");
Date date = new Date();
date.setTime(1194710400000L);
System.out.println(format.format(date));我想问的是在oracle数据库中能不能不用程序函数,就将所有的时间戳转换成yyyy-MM-dd hh-mm-ss类型时间,而不是一条一条的转换?