[thelist] Date Masking in SQL Server 2k?

Ken Schaefer ken at adOpenStatic.com
Mon Oct 6 20:58:09 CDT 2003


There is no such thing as a a "Date" field in SQL Server. You only have a
Date/Time field (which means a date, and a time). If you supply no date,
then the default is used (eg 1st January 1900 for SmallDateTime), and if you
supply no time, then the default time is used (12:00:00 AM)

You use code either in your business/presentation layers to drop the extra
time data -or- you can use SQL Server's CONVERT() function to output the
data in the format that you want. Check in SQL Server Books Online for your
options.

Cheers
Ken

Microsoft MVP - Windows Server (IIS)

----- Original Message ----- 
From: "Rob Smith" <rob.smith at THERMON.com>
To: <thelist at lists.evolt.org>
Sent: Tuesday, October 07, 2003 12:34 AM
Subject: RE: [thelist] Date Masking in SQL Server 2k?


: Thanks Ken,
:
: That seems to work nicely. However, it supplements that field with the
: expected entire date from the Month down to the second. When I set up a
: "Mask" or date field in Access that just wants the MM/DD/YYYY do you think
: it'll through an error?
:
: Rob



More information about the thelist mailing list