Date format

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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?


Re: Date format

Rotsj wrote:
Quoted text here. Click to load it

"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')."

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:

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 is preferred. So by using the ISO 8601 you
will always know what the date means, no matter who and from where wrote it.

Site Timeline