difference between datetime & smalldatetime

Posted by Sandeepkasar under Sql Server on 4/17/2012 | Points: 10 | Views : 17399 | Status : [Member] | Replies : 7
What is the difference between datetime & smalldatetime data types in sql server




Responses

Posted by: Sakthi.Singaravel on: 4/17/2012 [Member] Silver | Points: 25

Up
0
Down
See this Microsoft reference with example...

http://msdn.microsoft.com/en-us/library/aa258277(v=sql.80).aspx

Regards,
Singaravel M

Sandeepkasar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
Range

SmallDateTime: 1 - jan - 1900 to 6 - jun - 2079
DateTime : 1 - jan -1753 to 31 - Dec - 9999

Precision

SmallDateTime: Minute
DateTime : Three hundredth of a second(3.33)

Storage

SmallDateTime: 4 Bytes
DateTime : 8 bytes

------------------------------------------------
Learn throughout life

Sandeepkasar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sridevi on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Sandeep,

Could you please clarify about the range?

Do u mean that we have to give only in between values which u have mentioned?

Regards,
Sridevi



Sridevi

Sandeepkasar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
Hi sridevi

It's not sandeep it's sunil or sunny

Yes!!! you are correct .


------------------------------------------------
Learn throughout life

Sandeepkasar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sridevi on: 4/17/2012 [Member] Starter | Points: 25

Up
0
Down
Ok Sunil. Sorry for the mistake and Thanks


Sridevi

Sridevi

Sandeepkasar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/19/2012 [Member] Bronze | Points: 25

Up
0
Down
Refer this link

http://msdn.microsoft.com/en-us/library/aa258277(v=sql.80).aspx

Sandeepkasar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 6/20/2012 [Member] Silver | Points: 25

Up
0
Down
Please refer this SQL Server date vs smalldatetime http://stackoverflow.com/questions/5622158/sql-server-date-vs-smalldatetime

Also have look at this http://blog.sqlauthority.com/2010/06/01/sql-server-precision-of-smalldatetime-a-1-minute-precision/

Sandeepkasar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response