Equal dates RRS feed

  • Question

  • User-919981455 posted

    How can I equal these two?

    select CONVERT(VARCHAR(10),DateTm,111) from DayTmRec    //returns 5/22/2012

    select CONVERT(VARCHAR(10),GETDATE(),101)  //returns 05/22/2012


    what I want is they will return 5/22/2012 format

    Friday, May 25, 2012 2:53 AM


  • User1421001606 posted

    Hello friend,

    The return values are like this

    select CONVERT(VARCHAR(10),DateTm,111) from DayTmRec ----------- 2012/05/19

    select CONVERT(VARCHAR(10),GETDATE(),101) ----------------------------05/25/2012

    Check the below output once

    select CONVERT(VARCHAR(10),DateTm,101) from DayTmRec ------------05/25/2012

    can you give me some explaination about your issue if you are expecting more means.....

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, May 25, 2012 4:41 AM