Dear all
I am using below this code for getting Date with Time Value when I will enter data through Date Time Picker and Masked Edit Control. I am getting error like "string was not recognized as a valid date time".
string SCDateTimeValue = Convert.ToDateTime(dtpSCDate.Value) + mskSCTime.Text;
Thanks all
Loading
Hemant SrivastavaPosted Jan 31, 2014, 4:41 PM
string SCDateTimeValue = dtpSCDate.Value.ToShortDateString() + mskSCTime.Text;
PRASANTA BISWASPosted Jan 30, 2014, 11:22 PM
string SCDateTimeValue = Convert.ToString(dtpSCDate.Value) + mskSCTime.Text;
Output like "1/10/2014 12:00:00 AM06:58" But I want like "1/10/2014 06:58 AM" It's still not coming.
Hemant SrivastavaPosted Jan 30, 2014, 10:14 AM
you should convert dtpSCDate.Value to string format.