471,052 Members | 1,189 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,052 software developers and data experts.

Date format

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
1 4828
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.

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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.