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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I change structure of the Date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

31 Posts

Posted - 05/07/2013 :  01:54:48  Show Profile  Reply with Quote
Hi All,

In my App,some date based computations are there,so for practice purpose I tried the following example.

I created Table,that corresponding code is in following below.

CREATE TABLE DateFormatTesting(	date Date,Name varchar(100))

I inserted some values into that table,That corresponding code is in below

insert into DateFormatTesting (DateFormatTesting.date,DateFormatTesting.Name) values ('1990-12-21','Subbu')

If you can observe the above query,my Date structure is like YYYY-MM-DD,I evaluated above query,it returns 1 row affected.

again,I try toinsert different structure of the Date ,but it's not working.That corresponding code is in following below.

insert into DateFormatTesting (DateFormatTesting.date,DateFormatTesting.Name) values ('21-12-1990','Subbu')

How can I change Date structure.and also where will I get good documentations for Date with Examples.

Aged Yak Warrior

982 Posts

Posted - 05/07/2013 :  02:46:06  Show Profile  Reply with Quote
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 05/07/2013 :  03:51:23  Show Profile  Reply with Quote

SQL Server MVP
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.05 seconds. Powered By: Snitz Forums 2000