By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

date format

P: n/a
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.
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Stefan van Roosmalen wrote:
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???


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(date,format)

See more from:
http://dev.mysql.com/doc/mysql/en/Da...functions.html
Jul 20 '05 #2

P: n/a
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" <sp**********@yahoo.com> wrote in message
news:yz**************@read3.inet.fi...
Stefan van Roosmalen wrote:
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???


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(date,format)

See more from:
http://dev.mysql.com/doc/mysql/en/Da...functions.html

Jul 20 '05 #3

P: n/a
"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:
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.

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.