I have a page where I am attempting to save the time of a time picker to a string and I keep getting 00:00:00.
I am sending it to my EventItem page through binding from my EventList page.
So I have
foo_time.SetBinding(TimePicker.TimeProperty, "EventStartTime"); for start time and similar for end time.
Then I take the
foo_string.Text = stime.Time.ToString(); to pull the time into a string.
Ideally I would love to have it display something like 5:00 AM, but below are some of the things I have tried with no luck:
foo_string = new DateTime(foo_time.Time.Ticks).ToString("h:mm tt")
foo_string = foo_time.Time.ToString(@"h:mm");
Side note, I am basically creating temporary timepicker just to bind the time to it so I can pull the time from it and the timepicker is never used. I am doing the same for datepicker and labels, so if there is an easier way to call a binding than something like below I would LOVE to know as my code looks bloated:
addr = temp_lbl.Text;