Add 2 Hours with current time

Hi,
I want to Add 2 hours with current time.Or Get after 2 hours time for booking purpose.How it will be? Please help

Regards

Hi friend.

I suggest you Moment.js.

Hai
@quicoli but i cant see that.i need booing so need to get after 2 hours from current time should not be book previos time na

Is there technic using min in angularjs?

Here my friend:

var timestring1 = “2015-06-26T00:00:00Z”; //here you could get current datetime…
var timestring2 = “2015-06-26T02:00:00Z”;
var startdate = moment(timestring1);
var expected_enddate = moment(timestring2);
var returned_endate = moment(startdate).add(2, ‘hours’); // see the cloning?
returned_endate.isSame(expected_enddate) // true

Thanks Dear
I wil check it out :blush:

Hello
@quicoli now i didnt got the html part
this is what iam given

 <input type="text" class="startdate" />
    <input type="text" class="timestring1" /> to
    <input type="text" class="timestring2" />
    <input type="text" class="expected_enddate" />

:cry: