query:

```
    mongo_date_formatter = {
        "$addFields": {
            "Date": {
                "$dateFromString": {
                    "dateString": "$Date",
                    "format": "%d-%m-%Y"
                }
            }
        }
    }

```

date format in database:

```
"Date": "2018-04-15"

```

error i am getting:

```
    OperationFailure at /api/data/
    unknown operator: $dateFromString

```

version on local system:

```
    MongoDB shell version v4.0.9

```

version in server: 

```
    3.2.0

```

i tried with:

```
    mongo_date_formatter = {
        "$addFields": {
            "Date": {
                "$dateToString": {
                    "date": "$Date",
                    "format": "%Y-%m-%d"
                }
            }
        }
    }

```

This . it is not working.

I thing it is the problem with the server . is there any way to fix it?

Please have a look.