db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Help, a simple question!
Date Tue, 25 Jan 2011 23:03:45 GMT
"落叶风中舞" <bailongmail@qq.com> writes:

> hello:
>      How to get database time use sql clause in Derby?

Hi,

You can use the functions CURRENT_TIME, CURRENT_DATE or
CURRENT_TIMESTAMP to get the time using SQL. For example:

ij> values current_time;
1       
--------
23:59:52

1 row selected
ij> values current_timestamp;
1                            
-----------------------------
2011-01-25 23:59:55.525      

1 row selected
ij> values current_date;
1         
----------
2011-01-26

1 row selected


-- 
Knut Anders

Mime
View raw message