?
Solved

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

Posted on 2011-02-11
2
Medium Priority
?
604 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
sshah254 earned 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

719 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