SyntaxFix
Write A Post
Hire A Developer
Questions
Use the constructor that allows you to specify the year, month, day, hours, minutes, and seconds:
var dateNow = DateTime.Now; var date = new DateTime(dateNow.Year, dateNow.Month, dateNow.Day, 4, 5, 6);