I'm trying to save a date in database with ASP.NET. The datatype of Date in the database is datetime
.
I want to save it as for example (23/02/2014 00:00:00)
That is, I want to save Date, Month and Year, and then have time always be 00:00:00. I also want to have zeros before month and/or day when they are only one number. e.g. 02/06/2014 instead of 2/6/2014.
This is possible when the datatype is varchar
but how would I do this when the datatype is datetime
?