0

I'm writing a website that consumes a service, one of the fields returned from said service is a date / time field. However the value returning is in this format:

/Date(1401663600000+0100)/

I've been battling to convert this format in JavaScript, can anyone assist?

Joofville
  • 197
  • 1
  • 2
  • 9
  • 1
    new Date(1401663600000+0100) outputs Mon Jun 02 2014 04:30:00 GMT+0530 (India Standard Time). So just get the contents within braces and pass is to new Date() – Surender Feb 17 '15 at 06:47
  • 1
    possible duplicate of [ASP.NET MVC JsonResult Date Format](http://stackoverflow.com/questions/726334/asp-net-mvc-jsonresult-date-format) – Markus Feb 17 '15 at 06:48
  • Thanks Surender, that sorted it out, the /Date()/ thing threw me. – Joofville Feb 18 '15 at 06:48

1 Answers1

0

new Date(1401663600000+0100) worked, the forward slash date threw me.

Joofville
  • 197
  • 1
  • 2
  • 9
  • Probably it's not working for you. This new Date(1401663600000+0100) will return the current date/time – Marco Jr Jun 01 '15 at 14:43