c# - Convert DatePicker Value to String in windows store app -
i have converted date picker values string this
bookingdate = date.date.tostring();
but gives value 18-aug-14 3:21:01 pm -07:00
. want in format 18/8/14
, how this?
you can format datetime
like;
date.date.tostring(@"dd\/m\/yy");
or
date.date.tostring("dd'/'m'/'yy");
and don't believe datetime.date
property returns pm -07:00
hour because documentation;
a new object same date instance, , time value set 12:00:00 midnight (00:00:00).
Comments
Post a Comment