No offense, but this is probably the worst advice I have seen in a long time.
First of all, the statement about defaults in ASP and SQL is incorrect. The truth is: this depends largely on your regional settings. You may see different behavior on, say, a Dutch and an English OS.
By storing dates as varchars, you loose all structural meaning of a date. Is 10/04/2004 a date entered by an American programmer representing October 4, or has it been entered by a Dutch programmer representing April 10? You can't tell anymore.
The trick is to store a date in a universal format that the database understands. The format is the ISO date. If you store date like this:
2006/02/04
the database understands it's Feb 4, and nothing else.
If you store dates in a universal format in the database, it will always represent a useful date. This means you can use functions like Day, Month etc to get the required parts from that date.
So, in short: don't store dates as text; you'll regret that pretty soon. Just store them in a universally understood format.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|