Solved

How Do I Set The Default Value Of Date Time In SQL

Posted on 2013-05-10
4
380 Views
Last Modified: 2013-05-10
I am using Microsoft Sql Server Manage Studio Express  C to create another field to store the date that an entry is made, I have been trying to use now() like i used to to in Access but it didn't like it, so what do i do the get the long date format of mm,dd,yyyy HH:nn? or something close

MgmtStudioExp
0
Comment
Question by:mickeyshelley1
[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
4 Comments
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 500 total points
ID: 39155853
getdate()
0
 
LVL 49

Expert Comment

by:PortletPaul
ID: 39155854
[in sql server] getdate() is the equivalent to now()

but I'm not familiar with that input form so I don't know what is expects/allows
0
 

Author Comment

by:mickeyshelley1
ID: 39155923
I tried getdate() but it timed out...
0
 

Author Closing Comment

by:mickeyshelley1
ID: 39156014
Your answer worked after i first saved the new field then cam back and modified it with the default value...Thank you very much
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

636 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