date format

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stefan van Roosmalen

    date format

    Hi there,

    I have developed several applications in Delphi. I used Paradox for my data
    storage.
    Now, I want to convert these databases to MySql.
    So that why I am looking for a way to convert the date format from
    YYYY-MM-DD to MM/DD/YYYY.
    Is this possible???

    gr.,
    Stefan.


  • Aggro

    #2
    Re: date format

    Stefan van Roosmalen wrote:
    [color=blue]
    > So that why I am looking for a way to convert the date format from
    > YYYY-MM-DD to MM/DD/YYYY.
    > Is this possible???[/color]

    Do you mean that you have a date-column in your database and you want to
    get it out as in MM/DD/YYYY format?

    Try function:
    DATE_FORMAT(dat e,format)

    See more from:

    Comment

    • Stefan van Roosmalen

      #3
      Re: date format

      I think this is not what I am looking for.

      The problem is that I want to re-use an application which was developed for
      a database system which is formatting dates like "mm/dd/yyyy". So, I am
      looking for a setting which can be used to change the entire date format
      within MySQL.

      gr.,
      Stefan.


      "Aggro" <spammerdream@y ahoo.com> wrote in message
      news:yzE2d.333$ B%6.68@read3.in et.fi...[color=blue]
      > Stefan van Roosmalen wrote:
      >[color=green]
      > > So that why I am looking for a way to convert the date format from
      > > YYYY-MM-DD to MM/DD/YYYY.
      > > Is this possible???[/color]
      >
      > Do you mean that you have a date-column in your database and you want to
      > get it out as in MM/DD/YYYY format?
      >
      > Try function:
      > DATE_FORMAT(dat e,format)
      >
      > See more from:
      > http://dev.mysql.com/doc/mysql/en/Da...functions.html[/color]


      Comment

      • Bill Karwin

        #4
        Re: date format

        "MySQL retrieves values for a given date or time type in a standard
        output format ..."
        [http://dev.mysql.com/doc/mysql/en/Da...me_types.html]

        That is to say, when you simply "SELECT DateColumn" you get the value in
        YYYY-MM-DD, and this is not customizable in a database-wide manner.

        The way to output dates formatted how you like them, you must use the
        DATE_FORMAT() function when you retrieve the data.

        The way to input dates formatted how you like them is... well, you
        can't. You must input dates in "year-month-day" order, according to the
        MySQL documentation web page referenced above.

        What I do in my web application is to parse a user's date input values
        with a flexible date-parsing package (I'm writing in Perl, so I decided
        to use the Date::Manip package), and then format the value in YYYY-MM-DD
        format before using it in a SQL statement.

        Regards,
        Bill K.

        Stefan van Roosmalen wrote:[color=blue]
        > I think this is not what I am looking for.
        >
        > The problem is that I want to re-use an application which was developed for
        > a database system which is formatting dates like "mm/dd/yyyy". So, I am
        > looking for a setting which can be used to change the entire date format
        > within MySQL.[/color]

        Comment

        Working...