1

I'm doing this for two hours and nothing. This is the date in JSON:

"\/Date(1330355834000+0100)\/"

Everything I found was without timezone or for JavaScript. How to convert it to DateTime (not Date)?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
petko_stankoski
  • 10,459
  • 41
  • 127
  • 231

3 Answers3

1

Scott Hanselman just posted an article about the pains of this. His post might be of some help.

Justin Pihony
  • 66,056
  • 18
  • 147
  • 180
0

I was able to get a json date and time with timezone using something like this:

var publishDate = new Date().toJSON();
adandrea808
  • 109
  • 11
-1

You can create your own JavaScriptConverter that can parse the data ad you would like. This gives you complete control over how your objects transform in to JSON objects and vice versa.

Brad Christie
  • 100,477
  • 16
  • 156
  • 200