Converting DateTime

  • I need to convert the DateTime from a table.  So far have this...

    CONVERT(varchar, n.TestDateTime)

    There maybe null values so this is returning nothing well I run my script.  I know I have to use ISNULL but are unsure as to where on this line of code to place it.

    Any help would be greatly appreciated.

     

     

     

  • SELECT ISNULL(CONVERT(varchar, n.TestDateTime),getdate())...

    substitute getdate() with whatever you want it to return if value is NULL.







    **ASCII stupid question, get a stupid ANSI !!!**

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

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