In RethinkDB, we first saved documents in which dates were stored as a number of milliseconds (for example, 1542931139987 ), but for convenience of sampling, we began to save dates in the internal format RethinkDB. At the same time, there are documents in the database with the old date format, and with the new one. You need to convert time stamps to database format.
How can this be done?
We are trying to do this: 1) Copy the field from the timestamp to the new field, converting the values 2) Delete the old field 3) Rename the new field to old
The conversion I am trying to do is: r.db("test").table("test").update({xTimestamp: new Date(r.row("timestamp"))})
But it does not work. How to make date conversion?