timestamp - Javascript:Add Hours to Date -


I'm new to Java scripting and I'm trying the following code

  added Can be var r = document.getElementById ("Choose"). Values; // r can be 5 or 2.5 or so. Var dt = new date (); Var time = dt.getHours (); Var time2 = dt.setHours (1); Warning (time 2);   

But I get some of these kind of values ​​ 1398284822090 Is not there a better way to add hours and change in standard format? For more information, any document will also be useful. Thank you ..

long value is a timestamp calling setHours < / Code> Really changes the date to dt , so that you simply:

  dt.setHours (1); Warning (dt);    

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -