469,626 Members | 1,025 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

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

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
1 1570
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.

Similar topics

1 post views Thread by Steve | last post: by
reply views Thread by miketayloruk | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.