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 3272020
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:47:04+00:00 2026-05-17T18:47:04+00:00

I have next date string: Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)

  • 0

I have next date string:

“Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)”

and I’m trying to convert it to the Date object:

date = new Date("Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)")  
=> Invalid Date {}

and it doesn’t work. And

date = new Date("Thu Nov 14 2 01:01:00 GMT+0200 (GTB Standard Time)")  
=> Invalid Date {}

doesn’t work too

but

date = new Date("Thu Nov 14 2002 01:01:00 GMT+0200 (GTB Standard Time)")

works

Does anyone know an elegant way to parse it ?

  • 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-17T18:47:05+00:00Added an answer on May 17, 2026 at 6:47 pm

    You can set any date. including minutes,hours and milliseconds directly using a timestamp-
    dates before 1970 are negative integers.

    alert(new Date(-62076675540000).toUTCString());
    
    // >> Wed, 13 Nov 0002 23:01:00 GMT
    
    Or you can set the date as a string by replacing the years to make it over 1000,
    then subtracting the amount you added  with setFullYear()
    
    var d=new Date("Thu Nov 14 1002 01:01:00 GMT+0200 (GTB Standard Time)")
    d.setFullYear(d.getFullYear()-1000)
    alert(d.toUTCString())
    
    // >> Wed, 13 Nov 0002 23:01:00 GMT
    
    You can automate a conversion to timestamps-
    
    var s="Thu Nov 14 0002 01:01:00 GMT+0200 (GTB Standard Time)";
    var y=s.split(' ')[3], y2=5000+(+y);
    var d=new Date(s.replace(y,y2));
    d.setFullYear(d.getFullYear()-5000)
    var timestamp=+d;
    alert(timestamp)
    // >> -62076675540000
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DATE column that I want to round to the next-lower 10
I have next interface public interface IMyInterface { string this[string key] { get; set;
I have next 2 blocks of code: def replace_re(text): start = time.time() new_text =
I have accepted various types of data inputs (integer, double, string and date) to
I have NSUserDefaults storing a number of string variables for things like name, date
I have a next trouble. In database date storred as md5 from date. When
I have time stamps as string format Sun Jul 10 17:47:55 EDT 2011 I
I am trying to return a json string via jQuery of an object using
I'm trying to make a Regex that matches this string {Date HH:MM:ss}, but here's
I am trying to make a webpage and have the next three events on

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.