c# - Error message "The Id has an invalid format" when setting Start datetime object -
i use understand error message in last line tries tell me.
the second line ok, possible id not yet set before save appointment. why can change subject , location, not start?
app = new appointment(ews); // unid = app.id.uniqueid; <- throws error "the id has invalid format" app.subject = ce.subject; app.location = ce.location; app.start = datetime.parseexact(ce.startdate + " " + ce.starttime, datestring + " " + timestring, null); // <- throws "the id has invalid format"
this signature of method using extract date
public static datetime parseexact( string s, string format, iformatprovider provider )
it throw formatexception if
- s or format empty string
- s not contain date , time corresponds pattern specified in format.
- the hour component , am/pm designator in s not agree.
Comments
Post a Comment