Solved

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

Posted on 2013-05-10
4
373 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 48

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
Following an example - removing duplicate strings 4 70
Table create permissions on SQL Server 2005 9 45
Strange msg in the SSMS pane 13 64
Help  needed 3 54
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

751 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