Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    225

    Unanswered: Change Date Format in Mysql Table

    currently my MysQL table store a feild called

    DOB

    and the date has to be entered as

    yyyy/mm/dd

    i would like it to be

    dd/mm/yyyy

    how do i do this please

    sorry for asking such a silly question

    Andy

  2. #2
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    Mysql uses the yyyy-mm-dd DATE/DATETIME format as it makes sorting and comparisons work correctly.

    If you want mysql to covert the format on input and output, you need to use the - DATE_FORMAT(date,format) - function.

    This function is of some use as well -
    GET_FORMAT(DATE|TIME|DATETIME, 'EUR'|'USA'|'JIS'|'ISO'|'INTERNAL')

    Returns a format string. This function is useful in combination with the DATE_FORMAT() and the STR_TO_DATE() functions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •