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

Date format

P: n/a
Hi,
i'm using visual foxpro 9 with a mysql 5 database, for direct access to my
database i use navicat. In visual foxpro i've set my date format to
dd-mm-yyyy, also i did this in navicat.
However when i insert a date into my database i have to insert it with the
format yyyy-mm-dd. Is this a setting in mysql or is there another reason?

Thanks.
Rotsj.
Feb 1 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Rotsj wrote:
Hi,
i'm using visual foxpro 9 with a mysql 5 database, for direct access to my
database i use navicat. In visual foxpro i've set my date format to
dd-mm-yyyy, also i did this in navicat.
However when i insert a date into my database i have to insert it with the
format yyyy-mm-dd. Is this a setting in mysql or is there another reason?


"Although MySQL tries to interpret values in several formats, dates
always must be given in year-month-day order (for example, '98-09-04'),
rather than in the month-day-year or day-month-year orders commonly used
elsewhere (for example, '09-04-98', '04-09-98')."
http://dev.mysql.com/doc/refman/5.0/...ime-types.html

Depending on what version you are using, there are less or more easy
methods to convert date from one format to another. See these functions
for starters:
http://dev.mysql.com/doc/refman/5.0/...functions.html

The reason for saving dates in IS0 8601 format is that there is not that
many ways to tell does for example "01.12.2005" mean 2005-12-01 or is it
2005-01-12. As in some countries people prefer day.month.year format and
in the others month.day.year is preferred. So by using the ISO 8601 you
will always know what the date means, no matter who and from where wrote it.
http://www.w3.org/QA/Tips/iso-date
Feb 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.