Date Format as dd-mm-yyyy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ramya Kalai
    New Member
    • Feb 2012
    • 1

    Date Format as dd-mm-yyyy

    I would like to insert the date as in the dd-mm-yyyy format in sql, can anyone suggest me the syntax
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    You don't store dates in the database according to a certain format. Date formats are only important to users when you display the date to them or when they capture a date on some screen. In that case you would format the date according to their preferences (typically locale).
    If you have text then you can convert it to a date using the STR_TO_DATE function.

    Comment

    Working...