• Luis Cazares (8/29/2014)


    Welsh Corgi (8/29/2014)


    I want to do the Equivalent of the following SQL Select and return the result listed below:

    SELECT CONVERT(DATE,GETDATE()) AS CurrentDate;

    CurrentDate

    2014-08-29

    Thank you.

    Equivalent in Oracle?

    SELECT SYSDATE AS Datetype,

    TRUNC(SYSDATE) AS NoTimeDate,

    TO_CHAR(SYSDATE, 'YYYY-MM-DD') AS StringDate

    FROM Dual;

    That is exactly what I was looking for. Thanks.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/