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

  1. s or format empty string
  2. s not contain date , time corresponds pattern specified in format.
  3. the hour component , am/pm designator in s not agree.

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -