471,863 Members | 1,154 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,863 software developers and data experts.

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 1638
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
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.