• SanjayAttray (10/26/2009)


    Does any one uses mixed datetime styles in a single query like the above one ?

    I haven't seen any.

    Probably not, but some readers no doubt will benefit from knowing the CONVERT function exists and what it can do. It's a good tool to use in reporting or on inquiry forms. I get a lot of use from:

    SELECT CONVERT(varchar(10),GETDATE(),126).

    More often with a Datetime column than with GETDATE(). Note the varchar length to drop the time element.

    Tom Garth
    Vertical Solutions[/url]

    "There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers