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
RDF data
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

dayname

decompose a datetime to its components
dayname (in dt datetime);
dayofmonth (in dt datetime);
dayofweek (in dt datetime);
dayofyear (in dt datetime);
hour (in dt datetime);
minute (in dt datetime);
month (in dt datetime);
monthname (in dt datetime);
quarter (in dt datetime);
second (in dt datetime);
timezone (in dt datetime);
week (in dt datetime);
year (in dt datetime);
Parameters
dt – A datetime value.
Return Values

monthname and dayname return a varchar. The others return an integer.

Description

These functions decompose a datetime to its components. These can be used on timestamps, datetimes, dates and times, all being the same internal data type.

:  dayname  	name of day
:  monthname  	name of month
:  dayofmonth  	day of month
:  dayofweek  	day of week
:  dayofyear  	day since start of year
:  quarter  	quarter number,
:  week  		week number
:  month  		month number, starting at 1 for January
:  year  		year
:  hour  		hour
:  minute  		minute
:  second  		second
:  timezone  	offset from UTC in minutes
Examples
Simple example
SQL> select dayname(stringdate('2001-03-02'));
callret
VARCHAR
_______________________________________________________________________________

Friday

1 Rows. -- 3 msec.
See Also

stringdate, datestring, datestring_GMT, The TIMESTAMP datatype