what is default value of datetime class in C# , SQL ?

Posted by Sandeepmhatre under Visual Studio on 3/26/2013 | Points: 10 | Views : 2654 | Status : [Member] | Replies : 3
what is default value of datetime class in C# , SQL ?

Sandeep M,
Software Developer
Follow me on :
http://sandeepmhatre.blogspot.in



Responses

Posted by: Satyapriyanayak on: 3/26/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
http://www.dotnetperls.com/datetime-minvalue

If this post helps you mark it as answer
Thanks

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

Posted by: Mohansubramanian on: 3/26/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
Asp.Net :
DateTime.MinValue
DateTime.MaxValue
DateTime.Now

Sql Server :
ALTER TABLE YourTable ADD CONSTRAINT DF_YourTable DEFAULT GETDATE() FOR YourColumn

Regards,
Mohan
powerofmicrosoft.blogspot.in


Regards,
Mohan Subramanian
http://mohanks.com

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

Posted by: Jayakumars on: 3/26/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

refer this

Select GetDate()

2013-03-26 20:52:22.873
Year-Month-Date


Mark as Answer if its helpful to you

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

Login to post response