Solved

date field sql server --- set to automatically create todays date when record added

Posted on 2011-02-11
2
597 Views
Last Modified: 2012-05-11
I have a date created (field) in a users table. How would I make it so that when a record is added to the table it would be automatically the current date/time.

What would i put in default value or binding?
0
Comment
Question by:vbnetcoder
2 Comments
 
LVL 9

Accepted Solution

by:
sshah254 earned 250 total points
ID: 34875215
http://msdn.microsoft.com/en-us/library/ms174979.aspx

constant_expression
Is a constant, NULL, or a system function that is used as the default value for the column.

So GETDATE() should work.

Ss
0
 

Author Closing Comment

by:vbnetcoder
ID: 34875261
ty
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question