Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
Axios request returning 'invalid date' in React but API response in network calls returns date string

I am trying to fetch data from an api. Everything returns as it should when I look in the network call but when I run console.log(response), 'dateModified' shows as 'Invalid Date' even though the network call is fine. Does axios automatically try to convert the date string into a date object or is something else happening? I see no reason why it would be fine on the network call but not when I console.log or try to use the value

Ex: Axios call:

axios.get('/apihere').then((response) => {
  console.log(response)
}

returns:

Object {
    dateModified: Invalid Date
  }

which has an option to expand and show " Date.prototype {...}"

Network call:

Object {
    dateModified: "06/02/2022"
  }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!