home
Hero image for: How to convert string fields to date fields in MongoDB

How to convert string fields to date fields in MongoDB

By Eduardo García ● CTO | August 26th, 2019

It's normal that we migrate date from other database engines or maybe import from a simple source of information like CSV file. At the end of any migration, one of the most common mistakes is store dates as strings, instead of a Date field that could be understood for your new database engine.

In terms of MongoDB, storing dates as string limit us to use Date functions to filter or process that information in a proper way.  here I want to show you how to solve that issue and don't get crazy in the process.

Related Posts