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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:45:28+00:00 2026-06-11T14:45:28+00:00

I have just installed ASP MVC 4 and my JSON dates are still coming

  • 0

I have just installed ASP MVC 4 and my JSON dates are still coming back in the old format {"timestamp":"\/Date(1348070400000)\/"}.

I was under the impression that they should be coming back in the format 2012-02-18T00:54:06.8447642Z without me doing anything.

Note: JSON.NET is now an integral part of ASP.NET Web API so you can
just us it out of the box.

My controller looks something like this

public JsonResult Test()
{
    return Json(new {timestamp = DateTime.Now()}, JsonRequestBehavior.AllowGet);
}

How can I get this to work? Do I need to make a change in my Global.asax.cs or Web.config?

  • 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-11T14:45:29+00:00Added an answer on June 11, 2026 at 2:45 pm

    I was under the impression that they should be coming back in the
    format 2012-02-18T00:54:06.8447642Z without me doing anything.

    That’s true only for ASP.NET Web API (ApiControllers). But standard ASP.NET MVC controller actions returning JsonResults still use the JavaScriptSerializer. So if you want to use ISO 8601 dates you could swap this serializer by JSON.NET by writing a custom action result. Just add the proper converter to the settings used by the serializer:

    SerializerSettings.Converters.Add(new IsoDateTimeConverter());
    

    You might be asking why they didn’t implement JSON.NET for standard controllers. I guess it’s for compatibility reasons as that would be an important breaking change. But I would probably have made JSON.NET the default serializer with a fallback option for those upgrading their existing applications.

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

Sidebar

Related Questions

I just installed the ASP.Net MVC Preview 2 so I can have a look
i have installed ckeditor into my asp.mvc project, now i need to implement just
I have just installed a ASP.Net Mvc application on a windows server 2008. When
I have just installed the RTW 1.0 of the MVC framework. I was using
I just installed ASP.NET MVC 3.0 RC and then when i am creating new
I have an ASP.NET MVC 3 web application. I recently installed T4MVC templates by
I have downloaded and installed the release version of ASP.NET MVC 3 (File version:
I am working on an ASP .NET Mvc 3 App and have installed Ninject.Mvc3
I have installed MVC 3 and now I'm trying to follow these steps: http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-1
I have Visual Studio 2008 SP1 and ASP.NET MVC RC installed on a XP

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.