Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    31

    Unanswered: Very Simple Date format question

    I simply want to format a datetime to be printed out as 'mm/dd/yyyy', instead of 'January xx, xxxx tttt'. For example:

    declare @thedate as smalldatetime

    set @thedate = (SELECT SampDate
    FROM table where tableID = 1)

    print @thedate

    This has got to be ridiculously obvious. Right??

  2. #2
    Join Date
    Sep 2003
    Location
    Dallas, Texas
    Posts
    311
    select convert(char(10), getdate(), 101)

  3. #3
    Join Date
    Jun 2004
    Posts
    31
    Thanks. That works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •