Format Date Time

If you pass the datetime in json format ( and apply to the view with Knockout) then you will need some formatting – because the standard format is not good .

So I have used  http://blog.stevenlevithan.com/archives/date-time-format – easy to understand and with examples.

Reccomended!


Posted

in

, ,

by

Tags:

Comments

3 responses to “Format Date Time”

  1. Tudor Avatar
    Tudor

    Intrebarea e – care e formatul in care ar trebui serializat un DateTime in format JSON? Cum nu prea exista un standard in sensul asta, fiecare alege ce vrea, din pacate..

    1. Andrei Ignat Avatar
      Andrei Ignat

      JavascriptSerializer

  2. Tudor Avatar
    Tudor

    JavaScriptSerialzer din .NET utilizeaza acel format ciudat pentru Date in JSON introdus de Microsoft..
    La http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx explica de ce l-au ales, dar tot acolo spune Le Roy intr-un comment: “In any case, everybody’s moving away from this and using ISO strings despite their disadvantages. Nothing left to see here. Move along” 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *