SQL statement is returning "Jan 1 1900 12:00AM" when reading null value in date. How can I return blank value? RRS feed

  • Question

  • User-2060727494 posted

    My stored procedure returns "Jan  1 1900 12:00AM".  Instead, I want to return a blank value.  What's the best way to do this?

    I first convert the datetime column to varchar(50).  Here is the line:

    CONVERT(varchar(50), IsNull(rh.ReceivedDate, '')) As RecDate

    Friday, December 18, 2015 7:44 PM


  • User77042963 posted

    ISNULL(CONVERT(varchar(20),  rh.ReceivedDate ),'')  As RecDate

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 18, 2015 9:32 PM