Increment datetime using update by query

A colleague was able to put the following together and has resolved the issue

POST localhost:9200/*/_update_by_query
 
{
  "script": {
    "source": "def df = DateTimeFormatter.ofPattern('yyyy-MM-dd\\'T\\'HH:mm:ss.SSS\\'Z\\'');def tmp = LocalDateTime.parse(ctx._source.datetime,df);ctx._source.datetime=tmp.plusMonths(1);",
    "lang": "painless"
  },
  "query": {"match_all":{}}
}