If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Do you actually need to use 999 or are you using it for a default value? If default use NULL instead.
If 999 is actually needed you probably need to use type of CHAR for your column though you wouldn't be able to do date calculations that you can with a DATE column type.
I need to use year before 999. I was thinking I have to use CHAR for my column.
But it seems I can insert data that is less than year 1000. I will see if this actually works.
The DATETIME type is used when you need values that contain both date and time information. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MMS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. (``Supported'' means that although earlier values might work, there is no guarantee that they will.)