TRUNC

From Oracle FAQ
Jump to: navigation, search

TRUNC is a SQL function that truncates a DATE or NUMBER value.

[edit] Syntax

Date values:

trunc (date)
trunc (date, 'format-string')

Number values:

trunc (a-number)
trunc (a-number, other-number)

[edit] Examples

SELECT trunc(SYSDATE,'month') FROM dual;

[edit] Also see