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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -