手机
当前位置:查字典教程网 >编程开发 >Oracle教程 >Oracle下时间转换在几种语言中的实现
Oracle下时间转换在几种语言中的实现
摘要:cshellperlphp下的日期时间转换:秒数与人类可读日期scalarlocaltime与secondssince`00:00:0019...

cshellperlphp下的日期时间转换:秒数与人类可读日期scalarlocaltime与secondssince`00:00:001970-01-01UTC'

scalarlocaltime26-bytestring与secondssince`00:00:001970-01-01UTC'

(1970年1月1日凌晨零点以来的秒数)

thenumberofsecondsthathavepassedsincetheEpoch:00:00:00January1,1970,CoordinatedUniversalTime(UTC).

c:

《AdvancedProgrammingintheUNIXEnvironment:SecondEdition》

简称《APUE》Seciont6.10Figure6.8.Relationshipofthevarioustimefunctions说的清楚

#include<time.h>

time_ttime(time_t*calptr);

structtm*localtime(consttime_t*calptr);

structtm*gmtime(consttime_t*calptr);

time_tmktime(structtm*tmptr);

char*asctime(conststructtm*tmptr);

char*ctime(consttime_t*calptr);

size_tstrftime(char*restrictbuf,size_tmaxsize,

constchar*restrictformat,

conststructtm*restricttmptr);

shell:

%date+%s

1128621784

%date-d"1970-01-01UTC1128621784seconds"

FriOct702:03:04CST2005

date-d"1970-01-01UTC1128621784seconds"+"%Y-%m-%d%H:%M:%S"

2005-10-0702:03:04

perl:

%perl-e'printscalarlocaltime1128621784'

FriOct702:03:042005

php:

date('Y-m-dH:i:s',time());

【Oracle下时间转换在几种语言中的实现】相关文章:

Oracle数据库的启动与关闭方法

Oracle提高SQL执行效率的3种方法

Oracle 表空间查询与操作方法

Oracle数据库TNS常见错误的解决办法

Oracle 数据库管理脚本命名规范

Oracle存储过程本地编译方式

在ADF中跟踪SQL执行时间实现代码

Oracle数据更改后出错怎么做?

Oracle不同数据库间对比分析脚本

Oracle 8i在P4上的安装

精品推荐
分类导航