By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,855 Members | 1,988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,855 IT Pros & Developers. It's quick & easy.

how to specify the default value for a field as todays date and time

P: n/a
Using VB Express and SQL.

I have an sql database. what function gives me todays date and time?
and do i enter it in the 'default' property for the column in the
database?

i've tried
now()
date()
date$()
dateandtime
all give me an error message - what am i doing wrong?

thanks,

GARY.

Oct 24 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
CT
Gary,

You can specify GETDATE() as the default value for a column.

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

<ga********@myway.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Using VB Express and SQL.

I have an sql database. what function gives me todays date and time?
and do i enter it in the 'default' property for the column in the
database?

i've tried
now()
date()
date$()
dateandtime
all give me an error message - what am i doing wrong?

thanks,

GARY.

Oct 24 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.