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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:28:22+00:00 2026-05-24T14:28:22+00:00

In my ASP .NET project we don’t use any server controlls and codebehind files

  • 0

In my ASP .NET project we don’t use any server controlls and codebehind files and work only with JavaScript, Asynch calls (send/recieve events to server with XMLHttpRequest) and SQL procedures.

So, i have a date in JavaScript, before i send it to ASP .NET like this: “Fri Aug 5 00:00:00 UTC+0400 2011” and i need to convert this on server or in JavaScript (before i send it) in format: “2011-08-05T00:00:00+04:00”.

How is it better could be done?

Thx.

Solution: use JSON.stringify.

  • 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-24T14:28:23+00:00Added an answer on May 24, 2026 at 2:28 pm

    I use this straightforward method:

    <script type="text/javascript">
    
    // Covert js-date to ISO8601-string.
    function DateToISO8601(dt) {
    
        if (dt == null) return null;
    
        var mnth = dt.getUTCMonth() + 1;
        if (mnth < 10) mnth = "0" + mnth;
        var day = dt.getUTCDate();
        if (day < 10) day = "0" + day;
        var yr = dt.getUTCFullYear();
        var hrs = dt.getUTCHours();
        if (hrs < 10) hrs = "0" + hrs;
        var min = dt.getUTCMinutes();
        if (min < 10) min = "0" + min;
        var secs = dt.getUTCSeconds();
        if (secs < 10) secs = "0" + secs;
    
        return yr + "-" + mnth + "-" + day + "T" + hrs + ":" + min + ":" + secs + "Z";
    }
    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a C#/ASP.NET project that has all the javascript files in a
I have an ASP.net project I'm looking at and they want to use MySQL.
I'm working on an ASP.NET project using MVP architecture. We would like to use
I'm using MySql in my asp.net project. But I don't want to type every
I need a combobox for an ASP.NET project, so I decided to use the
I have PDF that I would like to open from ASP.net project. I don't
I have a basic ASP.Net project created in Visual Studio 2008 on Windows Server
I have ASP.NET project and I want to know what is better to use.
I have many Javascript or jQuery methods in my ASP.net project. 85%+ is client
I have a ASP.NET project, in which I have a method with 10 local

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.