I have individual calendar and time pickers. I want to combine both and convert to GMT time.
var time = timepicker.Time; //This is in 24hour format, but needs to store in AM,PM format
var date = calendar.SelectedDate;
string add_date_time = date+ " " +time;
DateTime gmt = add_date_time.ToUnviersalTime();
I get the error as
"cannot convert string to System.DateTime"
EDIT:
this is xml code for calendar and timepicker.
<controls:Calendar x:Name="calendar"/>
<TimePicker x:Name="time_picker" Format = "T"/>
After converting to gmt, I want to store in DB.