• johnwalker10 (12/23/2015)


    try the below query to get result in DD/MM/YY format.

    select LEFT(convert(varchar(10), @date, 103),6) + Right(Year(@date)+ 1,2)

    Gosh, no... Never do date/time formatting for a GUI from SQL Server. Let the GUI do the formatting so that local datetime settings can prevail. As previously suggested on this thread, a PHP forum would be the best place to discover how to do this.

    --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)