# 22. Virtuoso Functions Guide - hour

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

## hour

get hour from a datetime
hour (in dt datetime);
Description

hour takes a datetime and returns an integer containing a number representing the hour of the datetime.

Parameters
dt – A datetime.
Return Values

An INTEGER containing the hour.

Examples
Simple example

Get current hour.

    SQL> select hour (now ());
    callret
    INTEGER
    _______________________________________________________________________________

    21

See Also

dayname, dayofmonth, dayofweek, dayofyear, quarter, week, month, year, minute, second, timezone