DATE

TO_TIMESTAMP()

  Syntax:

Example: SELECT TO_TIMESTAMP (’10-Sep-02 14:10:10.123000′, ‘DD-Mon-RR HH24:MI:SS.FF’) FROM DUAL; Example, 2 SELECT TO_TIMESTAMP (’10-Sept-02 14:10:10.123000′ DEFAULT NULL ON CONVERSION ERROR, ‘DD-Mon-RR HH24:MI:SS.FF’, ‘NLS_DATE_LANGUAGE = American’) “Value” FROM DUAL;

TO_TIMESTAMP() Read More »

TO_DATE()

Syntax: TO_DATE(char [ DEFAULT return_value ON CONVERSION ERROR ] Char: the date string that is being converted The optional DEFAULT return_value ON CONVERSION ERROR clause allows you to specify the value this function returns if an error occurs while converting char to DATE [, fmt [, ‘nlsparam’ ] ]) TO_DATE converts char to a value of DATE data type For char, you can specify any

TO_DATE() Read More »

TRUNC(date)

Syntax:

The TRUNC (date) function returns date with the time portion of the day truncated to the unit specified by the format model fmt. The value returned is always of data type DATE, If you omit fmt, then the default format model ‘DD‘ is used and the value returned is date truncated to the day with a time

TRUNC(date) Read More »

Scroll to Top