[thelist] Date Masking in SQL Server 2k?

Rob Smith rob.smith at THERMON.com
Mon Oct 6 09:34:25 CDT 2003


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

-----Original Message-----
From: Ken Schaefer [mailto:ken at adOpenStatic.com]
Sent: Friday, October 03, 2003 11:02 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Date Masking in SQL Server 2k?


You can supply a default date in SQL Server by editing the table properties
(eg in Enterprise Manager), and adding GetDate() as the default -> this is
equivalent (roughly) to Access's inbuild VBA Date() function which you can
use to supply today's date as default value.

If you're using some kind of Access form to enter this data (rather than
typing directly into the table), then I assume you'd need to program Date()
as the default value in the form, or write some code so that if the user
leaves it blank, then nothing is sent to SQL Server for that field (so that
SQL Server supplies the default date).

HTH

Cheers
Ken

Microsoft MVP - Windows Server (IIS)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Rob Smith" <rob.smith at THERMON.com>
Subject: RE: [thelist] Date Masking in SQL Server 2k?


: Hi Ken,
:
: A colleague of mine is trying to supply an Input mask for "Today's" date
in
: a particular form in efforts to elevate one more key stroke for the end
: user.
:
: i.e.
:
: Part Number: (user filled)
: Date: (auto filled)  <--------
: Invoiced: (user filled)
: < ok > < cancel >
:
: ... in Access 97. The original format used an input mask with access and
was
: a data type default if you will in "this" table. Now that the tables are
: linked tables, with Access serving as a front end, that option has
vanished.
: Just looking for another way to keep that input mask available.

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list