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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:54:41+00:00 2026-05-23T01:54:41+00:00

My Markup is like this : <div class=article> <p class=date>16-05-2011 15:28:24</p> </div> This output

  • 0

My Markup is like this :

<div class="article">
 <p class="date">16-05-2011 15:28:24</p>
</div>

This output is generated by a CMS and I searched for everywhere to modify the output but I didn’t reach a solution.

I want to use jQuery to remove the “hour” from the date paragraph.

Saying I don’t want any text after the “space” so that the day-month-year will show up only.

Any idea how to achieve this using jQuery?

  • 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-23T01:54:42+00:00Added an answer on May 23, 2026 at 1:54 am

    Pretty easy loop, splitting by a space with a limit of 1 item:

    $('p.date').each(function() {
        $(this).html($(this).html().split(" ",1)[0]);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got some markup that looks like this: <h3>Mgmt</h3> <div class=ManagementOperations>bla bla </div> <div
I have a markup like this: <div class=classA classB>the content</div> What I would like
I have some markup like so: <div class=list> <article> content... </article> <article> content... </article>
I have a html markup with some <div> elements like this: <div id=1 class=classic>i
I have my markup like this (for argument's sake) <div id=content></div> <div id=layout></div> <div
I have some markup like this: <p><a id=1 href=#>Link 1</a></p> <p id=1show class=starthidden>Hi! I
Currently I'm doing something like this in markup <input type=text ONKEYPRESS=InputNumeric(event); id=txtNumber /> But
I am using curl like this: curl -s -F uploaded_file=@/path_to_file;type=text/html -F output=soap12 http://localhost/w3c-markup-validator/check >text.xml
For a markup like this: <div id=set1> <div id=100>a div</div> <div id=101>another div</div> <div
I would like to render the following markup: <div class=row> <p> <label>Your Name</label> <input

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.