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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:45:03+00:00 2026-06-11T14:45:03+00:00

How can I manipulate a date time in the format below (I believe it

  • 0

How can I manipulate a date time in the format below (I believe it is ISO 8601 format) with JavaScript?

2010-01-13T18:31:16Z

I’d like to output as dd/mm/yyyy hh:mm:ss.

Thank you

  • 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-06-11T14:45:04+00:00Added an answer on June 11, 2026 at 2:45 pm

    If you really want plain English, why not convert the string to a Date and call date.toLocaleString(), or toUTCString() if you want GMT.

    var time=new Date(‘2010-01-13T18:31:16Z’).toLocaleString();

    If you want to support IE8 and older browsers you’ll need translate the string:

    (function(){
        var D= new Date('2011-06-02T09:34:29+02:00');
        if(!D || +D!==1307000069000){
            Date.fromISO= function(s){
                var day, tz,
                rx=/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*)?)([zZ]|([+\-])(\d\d):(\d\d))?$/,
                p= rx.exec(s) || [];
                if(p[1]){
                    day= p[1].split(/\D/);
                    for(var i=0,L=day.length;i<L;i++){
                    day[i]=parseInt(day[i], 10) || 0;
                    };
                    day[1]-= 1;
                    day= new Date(Date.UTC.apply(Date, day));
                    if(!day.getDate()) return NaN;
                    if(p[5]){
                        tz= (parseInt(p[5], 10)*60);
                        if(p[6]) tz+= parseInt(p[6], 10);
                        if(p[4]== '+') tz*= -1;
                        if(tz) day.setUTCMinutes(day.getUTCMinutes()+ tz);
                    }
                    return day;
                }
                return NaN;
            }
            // shim implemented;
        }
        else{
            Date.fromISO= function(s){
                return new Date(s);
            }
            //native ISO Date implemented;
        }
    })()
    

    var time= Date.fromISO(‘2010-01-13T18:31:16Z’).toLocaleString();

    returned value: (String) Wednesday, January 13, 2010 1:31:16 PM

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

Sidebar

Related Questions

Javascript can manipulate the document the browser is displaying, so the following: <script> document.write(<table><tr><td>Hola</td><td>Adios</td></tr></table>);
How can I manipulate using JavaScript (JQuery) a site, not in my server, that
Where can I find some examples on how to manipulate the time objects by
I'm displaying the date and time like this 24-Nov-2009 17:57:35 I'd like to convert
I would like to know if a class exists to manipulate date with symfony
I would like to get the current Date/Time in actionscript 3, and I want
I have dates in ISO 8601 format in the database, %Y-%m-%d . However, when the
I have situation where a user can manipulate a large set of data (presented
I have an interactive web application powered by jQuery where users can manipulate visual
How do I set this up so that I can manipulate $backgroundcolor = #00FFFF;

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.