Forum Post: RE: Adding a duration to a date to give a new date

  • Thread starter Thread starter Gian Torralba
  • Start date Start date
Status
Not open for further replies.
G

Gian Torralba

Guest
Hello, You can parse the token return into a date as Ricardo has posted. You can also add the duration by converting the duration into milliseconds. var date = new Date("{!date_token}"); date = new Date(date.setHours(0,0,0,0)); /*sets the date to 12:00 am*/ date = date.setMilliseconds(10000); /*sets the time of the date variable*/ return date; Thank you, Gian

Continue reading...
 
Status
Not open for further replies.
Back
Top