Printing date without timestamp

  • I have the below code:

    getdate()-2 but it is not pulling any data back because it pulls back the timestamp (2010-08-10 12:02:01.330)

    I need getdate() to print as 2010-08-10

    Any assistance on this is greatly appreciated!!!

    Thanks@

  • try this:-

    select convert(char(8),getdate(),102)

    ----------
    Ashish

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply