xaml - Get date from DatePicker using c# in windows store app -


i want insert date value in database have class have date time attribute

public datetime bookingdate { get; set; } 

i have date picker in xaml page named datepicker . want insert date value , how date using c#??

you can use date property , follow documentation

  datetimeoffset sourcetime = yourdatepicker.date;   bookingdate = sourcetime.datetime; 

to convert offset , bind datetimepicker

   datetime newbookingdate;    newbookingdate = datetime.specifykind(bookingdate, datetimekind.utc);    datetimeoffset bindtime = newbookingdate;    yourdatepicker.date = bindtime; 

adding datepicker (xaml)


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -