30 pts.
 How to create date in SQL Server 2000
i create a table with attribute date and i want to store date as "Date-Month-year" .what procedure to create a date and how we able to insert the required format by using sql server 2000.



Software/Hardware used:
sql server 2000
ASKED: July 10, 2010  1:28 PM
UPDATED: July 12, 2010  2:28 PM

Answer Wiki:
Use the DATETIME datatype. This will store the value in a universal format. You then simple control the display format from your application. And if u want to make change from your procedure just use following: SELECT CONVERT(VARCHAR(8), GETDATE(), 5) AS [DD-MM-YY] u can give datetime column name in place of GETDATE() --------- You can't control the format in which dates are stored in the database. You can only control the way they are displayed. <b>To insert into a datetime column you need to enclose the values in single quotes.</b> You might want to take a look at this article: <a href="http://www.databasejournal.com/features/mssql/article.php/10894_2191631_1/Working-with-SQL-Server-DateTime-Variables.htm">Working with SQL Server Date/Time Variables</a>
Last Wiki Answer Submitted:  July 12, 2010  2:28 pm  by  NetDeveloper   90 pts.
All Answer Wiki Contributors:  NetDeveloper   90 pts. , Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

insert into member(3,’jack’,'que’,06-01-1985)

i use datetime data type .
it gives invalid input error . plz explain how to insert date .

 30 pts.