Post a Reply
53358 views

Runtime Error

  1. 5 years ago

    Hi,
    What is the definition of:
    Runtime Error
    Unable to perform operator STOREAT on object for <monthstring[6] = "\(monthdate)">

    where month date = 3, monthstring = 2019-02-09 21:42:55 +0000
    There wasn't an issue in test code so trying to track where this went off the road.

    snippet
    var monthstring = today; // today is string of Date()
    var monthdate = Date(monthstring,"yyyy-MM-dd","EST");
    var nextmonth = monthdate.month +1; //next month
    if ( nextmonth < 10 ) {
    monthstring[6] = "\(monthdate)" // --> runtime error
    Thanks

  2. Got it - of course after posting -
    Have to force string String(today)