How to convert DateTime to shortdatetime in C#??

Posted by Abhishek Rao on Stack Overflow See other posts from Stack Overflow or by Abhishek Rao
Published on 2010-05-08T17:19:51Z Indexed on 2010/05/08 17:28 UTC
Read the original article Hit count: 237

Filed under:
|

I have a column in my datatable which is of DateTime Type. I only want the DatePart, hence when I use the ToShortDateTimeString it converts to short date but of string type. Hence when i reassign the string to the column of the datatable it again appends 12:00:00 to it. I cannot change the column type in my datatable. Is there any way to convert DateTime to ShortDateTime directly without converting to string?????

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET