locked
Datetime Parameter RRS feed

  • Question

  • User-797751191 posted

    Hi

      I have datatime parameter but in select statement i want to consider it as date only

    Thanks

    Monday, November 25, 2019 6:07 AM

Answers

  • User-2082239438 posted

    Cast the datetime column to date only.,

    SELECT CAST(DATECOLUMN AS DATE) --firt approach
    
    
    SELECT CONVERT(VARCHAR,DATECOLUMN,101) --second approach

    Find more details here

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 25, 2019 6:25 AM