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

  • Home
  • SEARCH
  • 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 7021625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:28:31+00:00 2026-05-27T23:28:31+00:00

The date field in my mongodb database is saved under the following format $date:

  • 0

The date field in my mongodb database is saved under the following format

        "$date": "2012-01-05T19:47:56.474Z"

But somehow mongoose returns it as

        date: Wed, 04 Jan 2012 19:14:33 GMT

Why does the format change, is it something i am doing in the query ?

  • 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-27T23:28:32+00:00Added an answer on May 27, 2026 at 11:28 pm

    That’s the way a standard JavaScript Date object is formatted when printing.

    You can print it out in ISO format using something like this:
    How do I output an ISO 8601 formatted string in JavaScript?

    Or you might try using a javascript date library for formatting such as:
    http://arshaw.com/xdate/#Formatting

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

Sidebar

Related Questions

I have a date field in the database table of this format 2012-02-1.i need
The date field when save to mongodb is in the format of: { _id
I have Database with date field. I see the time like: 1900-01-01 13:38:00.000 How
I want to assign date to Date field that is in DD-MM-YYYY format. That
Is it possible to format a date field in a SELECT * query? I
I have trouble saving my date field into database using CakePHP. Table column name
I want to validate my date field in mm-dd-yyyy format using jquery validation plugin.
I'm receiving a date field from a php file, and I need to format
I am getting a date field from the database in one of my variables,
I have a date field in flex and have the format set to YYYY-MM-DD.

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.