Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Setting default datetime in MSSQL Enterprise Manager

Posted on 2006-06-21
2
Medium Priority
?
381 Views
Last Modified: 2013-12-03
I have a datetime field in MSSQL.  I am using Enterprise Manager.  I would like to enter a default value for this field.  I try to enter (now())  or now()  or isNow()  but it will not take it.  How do I do it?
0
Comment
Question by:JuniorBee
2 Comments
 
LVL 20

Accepted Solution

by:
Sirees earned 1400 total points
ID: 16955538
Instead use getdate()
0
 
LVL 27

Assisted Solution

by:ptjcb
ptjcb earned 600 total points
ID: 16955588
Yes, SQL Server does not have  a NOW function. Sirees is right - use GETDATE() or CURRENT_TIMESTAMP - they are the same thing. If you need UTC the GETUTCDATE() will give you that.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

972 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