Convert Date Format in sql server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phanikumar32
    New Member
    • Apr 2014
    • 22

    Convert Date Format in sql server

    Hello all,

    Previously in my 'date' column the values are like below.
    Date
    ------
    wed o5/23/2013
    fri 03/20/2014
    ------------
    ------------
    etc......
    From this type of data i got one output that is
    Date
    --------
    05/23/2013
    03/20/2014
    ---------
    ---------
    etc......
    by using the function RIGHT(CONVERT(V ARCHAR(8), Date, 103), 10).


    Now from this getting data i want the result as dd/mm/yyyy format.
    that is
    Date
    ------
    23/05/2013
    20/03/2014
    ---------
    ---------
    etc......

    How i will get this type of result.
    Please any one guide me to do this one.

    Thanks In Advance,
    Phani Kumar.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Right now your data is in a string data type, first you need to convert it to a date data type, and then convert it back to a string data type with the format 103.

    Comment

    • phanikumar32
      New Member
      • Apr 2014
      • 22

      #3
      Thanks Rabbit.
      I solved my problem with your helpful guidance.

      Comment

      Working...