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
Solved

Setting default datetime in MSSQL Enterprise Manager

Posted on 2006-06-21
2
373 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 350 total points
ID: 16955538
Instead use getdate()
0
 
LVL 27

Assisted Solution

by:ptjcb
ptjcb earned 150 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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 ?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

861 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