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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:17:35+00:00 2026-06-08T19:17:35+00:00

I want to convert date time to specify format that is Wed Aug 01

  • 0

I want to convert date time to specify format that is

Wed Aug 01 2012 14:37:50 GMT+0530 (India Standard Time)

Actually i want to display the Timer using Jquery on web page. So i have tried some format i knew. And found some from http://www.dotnetperls.com/datetime-format But none of them return the result what i require. Actually i have to pass the time from server So i have tried the following code.
Code Behind

protected void Button3_Click(object sender, EventArgs e)
{
    //string hello = DateTime.UtcNow.ToString();
    string hello = String.Format("{0:F}", DateTime.UtcNow);

    DateTime.UtcNow.ToString("");
    ScriptManager.RegisterStartupScript(this, this.GetType(), "hdrEmpty1", "show(" + hello + ")", true);
}

Jquery

function show(datetime) {
        alert(datetime);
        var Digital = datetime  //new Date()
        var hours = Digital.getHours()
        var minutes = Digital.getMinutes()
        var seconds = Digital.getSeconds()
        var dn = "AM"
        if (hours > 12) {
            dn = "PM"
            hours = hours - 12
        }
        if (hours == 0)
            hours = 12
        if (minutes <= 9)
            minutes = "0" + minutes
        if (seconds <= 9)
            seconds = "0" + seconds
        document.getElementById('<%= Label1.ClientID %>').innerHTML = hours + ":" + minutes + ":" + seconds + " " + dn
        setTimeout("show()", 1000)
    }
  • 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-08T19:17:37+00:00Added an answer on June 8, 2026 at 7:17 pm

    You can use date.ToString("format") to do that. Microsoft offer a full reference on how to format your dates the way you want.

    Edit:

    Perhaps there isn’t a format ready that exactly matches your format, but you can combine your own based on the format specifiers provided in the above reference.

    // This will output something like Wed Aug 01 2012
    date.ToString("ddd MMM dd yyyy");
    

    I believe you can follow the same pattern to complete the rest on your own.

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

Sidebar

Related Questions

I have a Date format: 2009-08-10T16:03:03Z that I want to convert to: @MMM dd,
I have a date/time string like 2012-01-13 04:37:20 but I want to convert it
I want to convert date time object in java to json string in format
I have a set of date/time strings in the YYYYMMDDHHMMSS format that I want
I want to convert this date ( 02-12-2010) mm-dd-yyyy to time format ie to
I want to convert the date time in Mon APR 6, 2012 11:12 am
I have a Python datetime object that I want to convert to unix time,
I received DateTime String from Fedex in following format 2012-06-22T21:39:48-05:00 I want to convert
I have strings like 84, 03 etc. that I want to convert to Date
I want to convert a string like 2012-03-08T00:00:00+01:00 into Date.. I tried to use

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.