469,898 Members | 1,471 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

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.
Jul 20 '05 #1
3 2646
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
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
"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.

Similar topics

15 posts views Thread by Simon Brooke | last post: by
4 posts views Thread by Richard Hollenbeck | last post: by
5 posts views Thread by Macca | last post: by
12 posts views Thread by Assimalyst | last post: by
20 posts views Thread by andreas | last post: by
30 posts views Thread by fniles | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.