# 22. Virtuoso Functions Guide - curdate

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
datestring, ...
curdate
dateadd
datediff
datestring_gmt
dayname
dayofmonth
dayofweek
dayofyear
dt_set_tz
get_timestamp
getdate
hour
minute
month
monthname
msec_time
now
quarter
second
stringdate
stringtime
timezone
week
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## curdate

get current date and time
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
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

See Also

now

stringdate

datestring