SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Using the DATE data type in SQL Server 2008
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 12/06/2007 :  08:27:34  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote

In SQL Server 2008 we get a new DATE date type that allows you to store a
date without a time.



Read Using the DATE data type in SQL Server 2008

henrikop
Constraint Violating Yak Guru

Netherlands
280 Posts

Posted - 12/06/2007 :  09:04:32  Show Profile  Visit henrikop's Homepage  Reply with Quote
Good article. Simple and does the job. I'd like to add something of value here, but there's nothing I can think of.

Henri
~~~~
There's no place like 127.0.0.1
Go to Top of Page

easyrider
Starting Member

United Kingdom
3 Posts

Posted - 12/07/2007 :  04:24:04  Show Profile  Reply with Quote
Great no more remove (9,2) or storing dates as varchar, or whatever other bodge jobs I have used in the past.
Shame most of my customers are still using SQL2000 though. What can we do about that ?

Simon
Go to Top of Page

kunaaldesai
Starting Member

USA
36 Posts

Posted - 07/26/2009 :  22:10:43  Show Profile  Reply with Quote
Guys I am still wondering that if I want the date format to be declared as MM/DD/YYYY instead of YYYY-MM-DD.

I mean to say that if I declare any of the data type to be the date then is there any was that I can make MM/DD/YYYY default instead of current?

Kunal
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17645 Posts

Posted - 07/26/2009 :  22:14:52  Show Profile  Reply with Quote
That is formatting issue, nothing to do with how the date is stored in the database.

You can use convert() to format the date or perform the formatting on your front end application.


KH
Time is always against us

Go to Top of Page

kunaaldesai
Starting Member

USA
36 Posts

Posted - 07/26/2009 :  22:59:43  Show Profile  Reply with Quote
Thanks again KH I will consider it.
Go to Top of Page

JJ123
Starting Member

USA
1 Posts

Posted - 08/24/2011 :  19:15:53  Show Profile  Reply with Quote
My agency recently upgraded to SQL Server 2008 R2 and I immediately began taking advantage of the Date datatype. However, my front-end application, MS Access 2003 does not seem to recognize the date datatype. Access treats the date datatype as 'text'. Any thoughts on what to do? Do I have to find all the 'date' fields and convert back to datetime? Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000