To change Date Format in Sql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Limno
    New Member
    • Apr 2008
    • 92

    To change Date Format in Sql

    Hi,

    Can anyone suggest me, how to change the Date format in SQL. By Default it Creates datatype datetime as '0000-00-00 00:00:00'. But i want to change d format as Month/Date/Year. while Creating the table.

    How can i do this........... .

    Thanks in Advance.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Why are you worried about what the date looks like in the database?
    If it is to function as a DATETIME field then don't start fiddling.
    However. when you extract the date within a SELECT statement then you can start formatting.
    The CONVERT function is useful.
    Have a look at this article
    link

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      I agree.

      And if it's for display purposes, handle it on your front-end.

      -- CK

      Comment

      • Limno
        New Member
        • Apr 2008
        • 92

        #4
        Originally posted by ck9663
        I agree.

        And if it's for display purposes, handle it on your front-end.

        -- CK
        Thanks for ur suggestion,

        I got d answer. It's working properly.

        Comment

        Working...