convert date?

  • CONVERT(varchar(10), ProgramLOIAcknowledged ,101)

    but I need to add:

     AS [Letter of Intent Acknowledged]

  • Something like this?

    SELECT CONVERT(varchar(10), ProgramLOIAcknowledged ,101) AS [Letter of Intent Acknowledged]

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • How about this? I want the day of the month

    Birthdate char(10)

    SELECT substring(convert(char(2),datepart(day,BirthDate)),6,7) from FOR_UPDATE_CUST

    Error: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

  • I'd have to say the data in the Birthdate column was not a valid date or date format.  NULL is not a valid date during conversions. 

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • What are know the questions here?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 5 posts - 1 through 4 (of 4 total)

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