Last post Feb 24, 2010 04:42 AM by Binary_Fiddle
Feb 24, 2010 02:11 AM|srihari.kilari|LINK
I am building an RESTFull WCF service. My data contract types having the DateTime fields. If I assign the DateTime value of the field to DateTime.MinValue, the format of DateTime showing in the rendered output for Json is "Date(-62135596800000)" . In rest of
the cases it is showing the format "2007-10-30T06:56:00"
I tested the Json output with different dateTime values. Those are,
1. If DateTime field value is "DateTime.Now", then Json output format is Date(1266960616682-0800)
2. If DateTime field value is "DateTime.MinValue", then Json output format is Date(-62135596800000)
3. if we asssign any date explicitly, the json output format is "2007-10-30T06:56:00"
I want single DateTime format through out my json output. Could any body help me on this.
Thanks in Adanvce,
Feb 24, 2010 04:42 AM|Binary_Fiddle|LINK
DateTime value = new
DateTime(1, 1, 1, 0, 0, 0,DateTimeKind.Utc);