怎样通过存储过程获得服务器的日期和时间?

怎样通过存储过程获得服务器的日期和时间?
谢谢
---------------------------------------------------------------

date and time:
select cast('now' as timestamp) from rdb$database
date
select cast('now' as date) from rdb$database

---------------------------------------------------------------

如果想方便点可以把楼上的内容作一个domain或者udf
---------------------------------------------------------------

如果是ib6或以上, 或 firebird, 便可以用
current_date (03/13/03)
current_time (03:46pm)
current_timestamp (03/13/03 03:46pm)
直接在stored procedure中使用:

declare variable MyDate Date;
.....

MyDate = current_date;
......

Published At
Categories with 数据库类
comments powered by Disqus