1

I have a MongoDB that includes a data field in ISODate format. One record, for example, could be ISODate("2013-11-16T00:00:00Z")

Now I need to convert this to MySQL datetime format through Mongo Shell.

How can I use Mongo Shell to convert that value to a MySQL datetime format, 2013-11-16 00:00:00 in this case?

Eric Renouf
  • 13,950
  • 3
  • 45
  • 67
surendar
  • 11
  • 2

1 Answers1

0

Hope this will helps you

MongoDB DateTime Format

Community
  • 1
  • 1
Senanayaka
  • 309
  • 6
  • 18
  • I had similar problem, I do not see any great help in the above link – ravibeli Jan 28 '20 at 13:07
  • {"_id" : ObjectId("5e2d6c805e66af2cef0371ab"), "vendorType" : "MRC", "created_at" : ISODate("2020-01-26T10:40:00.514Z")} In this I just want to remove ISOdate and open and close braces I want something look like this: { "_id" : "5e2d6c805e66af2cef0371ab", "vendorType" : "MRC", "created_at" : "2020-01-26T10:40:00.514Z", "__v" : 0 }` – ravibeli Jan 28 '20 at 13:08