Hi,


I have a datetime picker from which I'm allowing the user to select a time. I've formatted it as hh:mm tt - 09:30 AM using properties. My problem is that while trying to save it into the database it is trying to pass the complete datetime instead of the formatted version, i realise its becos I have formatted only how it is displayed. In the table, I have formatted this time as Medium Time. So this is where the problem occurs.

Could someone tell me how i could format the time as 09.30 AM. I tried something like this...it did not work. I dont want to convert it to a string I want to keep it in datetime format itself as I'm passing it as a parameter to another class method using datetime type.

Code:
dtpFrom.Value.TimeOfDay
thanks so much in advance