Posted on: 8/4/2014 10:07:14 AM | Views : 371

Hi,
I have a date time variable to which i am assigning a date value fetching from data base. while fetching it in a data reader it is assigned some thing like this
object.OpenDate = Convert.ToDateTime(dr["opendate"].tostring());

This variable in the class OpenDate is of type date time. Now once the above statement is executed i get date along with the time as 8/4/2015 00:00:00 but i want to get rid of time. Ofcourse using string.toshortdate() will not help as its a string and it cant be assigned to a variable of type datetime. How do i go about it.

Thanks

N1ZAM

Go to the complete details ...