On Thu, 20 Mar 2003, Joshua Hoblitt wrote: > "As a string in either 'YYYY-MM-DD HH:MM:SS' or 'YY-MM-DD HH:MM:SS' > format. A ``relaxed'' syntax is allowed--any punctuation character may > be used as the delimiter between date parts or time parts. For example, > '98-12-31 11:30:45', '98.12.31 11+30+45', '98/12/31 11*30*45', and > '[EMAIL PROTECTED]@31 11^30^45' are equivalent." > > and > > "As a string with no delimiters in either 'YYYYMMDDHHMMSS' or > 'YYMMDDHHMMSS' format, provided that the string makes sense as a date. > For example, '19970523091528' and '970523091528' are interpreted as > '1997-05-23 09:15:28', but '971122129015' is illegal (it has a > nonsensical minute part) and becomes '0000-00-00 00:00:00'." > > and > > "As a number in either YYYYMMDDHHMMSS or YYMMDDHHMMSS format, provided > that the number makes sense as a date. For example, 19830905132800 and > 830905132800 are interpreted as '1983-09-05 13:28:00'." > > I think being a little more liberal in the excepted DATETIME format is > necessary. I think that documentation also says DATETIME can be in the > same format as TIMESTAMP(14). Although it's fairly vague on this.
Actually, I think maybe a doc patch is in order instead. The goal of the parse_* methods is to parse things returned _by MySQL_ as a result of queries, not to parse any format that MySQL itself might accept. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
