c# - How can I format a datetime into a string in javascript? -
i have c# datetime shows date(1309513219184) when try include in web page javascript. show 07/01/2011 09:30.
is there way can format in javascript or should first kind of c# format , print javascript string?
how can format it?
you can this:
var d = new date(milliseconds); // var d = new date(datestring); // var d = new date(year, month, day, hours, minutes, seconds, milliseconds); d.tostring(); // or d.tolocalestring()
or can use library datejs
Comments
Post a Comment