Why do you use a TEXT column to store a DATE value ?
pritaeas
Posting Expert
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
Mysql date structure is YYYY-MM-DD. (I thought that was Euro-style!) It's not configurable. We use MM/DD/YYYY here in the USA, so we have to bend and twist the date into our format.
Anyway, you use the PHP functions strtotime() and strftime() to manipulate the date into whatever format you wish. (see PHP manual).
JRM
Practically a Master Poster
621 posts since Nov 2006
Reputation Points: 130
Solved Threads: 75
I don't know. Did you try int ?
I know that you can get a leading 0 with decimal using all decimal numbers in a format like decimal 6,6 ,but there is that pesky dot...
In the end, the best way is the right way.
How much re-writing could it be?
That's the beauty of this forum, you can ask a question BEFORE you jump in the deep end.
JRM
Practically a Master Poster
621 posts since Nov 2006
Reputation Points: 130
Solved Threads: 75