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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:32:47+00:00 2026-06-15T02:32:47+00:00

I have a date from which I need to extract just the hours and

  • 0

I have a date from which I need to extract just the hours and minutes.
The date is displayed in “2012-11-27 13:36:00” format. So I need just 13:36.
I did something like this

var currTime = this.event_start;
alert(currTime);
var jsFormat = new Date(currTime);
alert(jsFormat);

currtime gives the correct date whereas jsFormat alerts a undefined.

  • 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-15T02:32:48+00:00Added an answer on June 15, 2026 at 2:32 am

    You could always do it the easy way 🙂

    <script>
    var currTime = "2012-11-27 13:36:00";
    var t1 = currTime.split(' ');
    var t2 = t1[1].split(':');
    var h = t2[0];
    var m = t2[1];
    
    alert(h+':'+m);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Calendar from which I need to pick a date so when
i have a textbox which is filled with date from a datepicker(calendar is accessed
i have a combobox which is displaying date from database...in my database the date
I have a value from my database. How do I extract the date from
Assume I have these tables, from which i need to display search results in
I need to find a date format which could adapt to the two following
Possible Duplicate: Converting date From one format to another I have a date, for
I need distinct year and month from date column which would be sorted by
i have an NSDate object from an old date which i am getting from
I have 2 tables from which i need to run a query to display

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.