• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Setting default datetime in MSSQL Enterprise Manager

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
JuniorBee
Asked:
JuniorBee
2 Solutions
 
SireesCommented:
Instead use getdate()
0
 
ptjcbCommented:
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now