Update type of a field in Elasticsearch

I have a index in Elasticsearch, and want to update the type of a field named currentTimeStamp from long to date, so that Kibana can work on it. Following is my current output of _mapping (Other fields have been removed for brevity).

{
  "myIndexname": {
    "mappings": {
      "myType": {
        "properties": {
          "currentTimeStamp": {
            "type": "long"
          }
         }
       }
     }
  }
}

When I try to run the following command for updating the type of the column to date type, I get the below mentioned error response. Any help on this is highly appreciated.

curl -X PUT myIndexname/_mapping/myType with the following payload

{
"myIndexname": {
	"properties": {
		"currentTimeStamp": {
			"type": "date",
			"format": "date_optional_time || epoch_millis"
		}
	}
 }
}

Error response:

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "Root mapping definition has unsupported parameters:  [optimizationframework : {properties={currentTimeStamp={type=date, format=date_optional_time || epoch_millis}}}]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Root mapping definition has unsupported parameters:  [optimizationframework : {properties={currentTimeStamp={type=date, format=date_optional_time || epoch_millis}}}]"
  },
  "status": 400
}

Does it matter if there is space before and after ||? In their docs I do not see it. Date field type | Elasticsearch Guide [8.11] | Elastic

No difference. I tried without spaces, and still does not work

You cannot change data type of a field in an existing index. Need to create a new mapping type and reindex your data. Search for reindex API in the Elastic document if you are running ES 2.3.0