Parsing the C# datetime to javascript datetime -


i know question similar others didn't found solution problem.

i have c# datetime property

 public datetime mydate { get;set;} 

when use ajax information, wrote in javascript like:

$.each(object, function(k,v){   alert(object.mydate); }); 

it returns like:

/date(1362478277517)/ 

it possible convert datetime javascript date ?

thank you.

new date(object.mydate); should work.

edit: var date = new date(parseint(object.mydate.substr(6)));

i've seen method:

var milli = "/date(1245398693390)/".replace(/\/date\((-?\d+)\)\//, '$1'); var d = new date(parseint(milli)); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -