I have a WCF rest service that returns some JSON data and accepts some POST parameter object that are of type DateTime.
When I receive the data which contains datetime fields the date time values are like :
"/Date(1388341800000+0530)/"
- How to I format to get the actual date (like 12/30/2013)
When I create a data for POST data like below it fails
var dataPost = { ID: "121", Name: "Test", DateAdmitted: "12/30/2013" }
This fails (Bad request). But if I pass :
var dataPost = {
ID: "121",
Name: "Test",
DateAdmitted: "/Date(1388341800000+0530)/"
}
I want to be able to pass"12/30/2013" but these are values I deal with in my HTML.
So basically I want to :
Somehow format the received DateTime to readable datetime. ("/Date(1388341800000+0530)/" --> "12/30/2013")
While sending convert the Readable datetime to this format :
( "12/30/2013" --> "/Date(1388341800000+0530)/")
Can somebody please help me.
- Girija