C#; storing a short date in a DateTime object
Posted
by contactmatt
on Stack Overflow
See other posts from Stack Overflow
or by contactmatt
Published on 2009-10-20T00:20:56Z
Indexed on
2010/03/25
17:33 UTC
Read the original article
Hit count: 346
I'm trying to store a shortened date (mm/dd/yyyy) into a DateTime object. The following code below is what I am currently trying to do; this includes the time (12:00:00 AM) which I do not want :(
DateTime goodDateHolder = Convert.ToDateTime(DateTime.Now.ToShortDateString());
Result will be 10/19/2009 12:00:00 AM
© Stack Overflow or respective owner