Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6907365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:25:32+00:00 2026-05-27T08:25:32+00:00

I am trying to format some data from Mongo into a CSV. One of

  • 0

I am trying to format some data from Mongo into a CSV. One of the fields is stored as an ISODate, so when querying Mongo, comes out like this:

... ISODate("2011-11-19T00:23:38.786Z") ...

I have a command like the following:

C:\Mongo\bin\mongoexport --csv -f "DOB","Name","Email" -c People -d PeopleDataStore -h [hostname]

This MongoExport command produces something like the following:

{ "$date" : 1321579509347 },"Bob","test@test.com"

How can I get the date that is the output of MongoExport to come out like “2011-11-19T00:23:38.786Z”, i.e. not an integer representation, and not wrapped in code structures?

Note that I am attempting to do all this from the command line, not from within an application that could process the results. An application will be my fallback plan.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:25:33+00:00Added an answer on May 27, 2026 at 8:25 am

    Don’t think this is possible using just mongoexport on it own, you’ll need to write your own little export script or post-process the date values to convert from the integer (milliseconds since 1 January 1970) to the ISO string format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to insert some data into a table from a csv document which
I'm trying to insert some data from a proprietary JSON database into MongoDB for
I am trying to load some data from a text file into a vector
I'm trying to import some data (using oracle sql developer) from a .csv file
I'm trying to get data from one database and put it in the format
I'm trying to nicely format some text data from database to send in emails
I am trying to format some bad html to output into a pop window.
I'm trying to export some data from MATLAB to a database. I use a
I'm trying to retrieve some data from a JSON response, but this doesn't seem
We're exporting some data from a website app into an Excel spreadsheet, however, when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.