[thelist] Date Masking in SQL Server 2k?

Joshua Olson joshua at waetech.com
Thu Oct 2 15:26:58 CDT 2003


----- Original Message ----- 
From: "Rob Smith" <rob.smith at THERMON.com>
Sent: Thursday, October 02, 2003 3:38 PM


> Anyone had experience in date masking, as the term is used in Access, in
SQL
> Server 2k? If so, how? I've Googled and only found headaches.

If by date mask you are referring to have the database enforce formatting on
a text field, then I don't think that SQL Server can natively handle that.
There are a couple mechanisms in place that may help.

1.  Focus on putting that logic in the middle ware, not the server.  Access
was a middle ware and a server all in one, so that's why they can get away
with that at the database level.

2.  Put date data in date fields, not text fields.  The database will
enforce the format of the data as well as then provide numerous data
validation routines as well as conversion routines.

3.  You can force data validation on updates and inserts using triggers, if
you so choose.

HTH,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168



More information about the thelist mailing list