c# - deserialize "/Date(1309498021672)/" in to DateTime -


i have object serialize javascriptserializer , output in javascript variable.

a property on object date gets converted eg. "/date(1309498021672)/"

i send value server via ui wcf service call. want deserialize value in datetime object.

how can this? working asp.net c# web application.

your string format little off, deserialize proper date.

var serializer = new system.web.script.serialization.javascriptserializer(); string json = "\"\\/date(1309498021672)\\/\""; datetime date = serializer.deserialize<datetime>(json); // date 7/1/2011 5:27:01 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -