Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Jesper Wisborg Krogh (mysqlwisborg.dk)
Date: Fri Dec 17 2010 - 05:06:52 CST
On 17/12/2010, at 9:02 AM, Jerry Schwartz wrote:
> I have to move the back-end of an Access application to MySQL, and I’ve run into one issue that I haven’t been able to solve yet.
> The Access database stores dates as text in a “yyyy/mm/dd” format. The problem is that the default value is a formula that generates the current date, formatted as text. In Access, it looks like
> This construct is used throughout the table definitions.
> Is there any alternative to setting the default to something else (NULL, for example) and moving the “default” into the application code? That would be a significant PITA.
If a 32-bit date range is enough, then you can use the timestamp data type. That supports having the current time as the default value. See also http://dev.mysql.com/doc/refman/5.1/en/timestamp.html