I have been messing around with this for a while now and have found no examples nor explanations about how to accomplish this task.
I have a collection of documents, each document has a date/time field. Ideally I need to generate a new field for each document where the value is based on the time from the date/time field with a constant factor added.
Alternatively, simply updating the value in place would suffice.
I have not been able to figure out how to reference the current document in a mongo shell update statement.
Is this folly? Should I give up and write an application do to complete this seemingly simple operation?
Thanks!