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;
Comments
Post a Comment