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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:21:49+00:00 2026-06-14T02:21:49+00:00

I have been playing around with this JavaScript to get the right format on

  • 0

I have been playing around with this JavaScript to get the right format on my date output, but with no luck. I need this code to show as Month Day, Year. As of now it’s showing dd/mm/yy.

Below is the script I’m using.

<script>
var tD = new Date();
var datestr = tD.getDate() + (tD.getMonth()+ 1)  + ", " + tD.getFullYear();
document.write("<input type='hidden' name='date' value='"+datestr+"'>");
</script>
  • 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-14T02:21:50+00:00Added an answer on June 14, 2026 at 2:21 am

    Here is a modification of another post here on Stack Overflow. I think this will do what you want.

    var tD = new Date();
    var monthNames = [ "January", "February", "March", "April", "May", "June",
       "July", "August", "September", "October", "November", "December" ];
    var datestr = monthNames[tD.getMonth()] + " " + tD.getDate()  + ", " + tD.getFullYear();
    document.write("<input type='hidden' name='date' value='"+datestr+"'>");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing around with this and wanted to get a second opinion.
I have been playing around with this preference activity code for most of the
I've been playing around with this for a couple of hours and have come
I've been playing around and searching a bit, but I can't figure this out.
We have been playing around with the canvas element, but are encountering sluggishness on
So I have been playing around with the facebook like button but I have
I'm have been playing around with linq this morning and have a questions about
I have been playing around with indexes on MySQL (5.5.24, WinXP), but I can't
I have been playing around with this problem since yesterday. I can't seem to
Pulling my hair out here... have been playing around with this for the last

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.