Top

Name

curdate , curtime , curdatetime — get current date and time

Synopsis

datetime curdate ( );
 
datetime curdatetime ( );
 
time curtime ( );
 

Description

These functions return the current date or time as a date, time or datetime, respectively. Internally they all return the same value but data type reported to client differs.

Parameters

None.

Return Types

In a result set to client, the column types reported are as follows: TIME for curtime , DATE for curdate and DATETIME for curdatetime .

Errors

These functions do not signal errors.

Examples

Example 24.57. Simple example

Get current date in different datatypes

SQL> select curdate(), curtime(), curdatetime();
callret     callret   callret
DATE        TIME      BINARY
_______________________________________________________________________________

2001.10.12  11:21.51  2001-10-12 11:21:51