ATF - how to add dynamic date but specifying time

Latoya
Kilo Guru

Hi

I know these works with the date fields for ATF

javascript: gs.daysAgo(-1);       Tomorrow

javascript: gs.daysAgo(1);             Yesterday

javascript: gs.daysAgo(-31);         31 days in future

javascript: gs.daysAgo(31);            31 days in past

javascript: gs.nowDateTime();        today

 

However. how do I specify the time?

For the change request form. I have planned start and end date fields that need to be on the same day but different times

 

Even if maybe the end date could be X hours after start date would help.

I was told that with ATF the javascript needs to be on one line of code. 

Any tips would be appreciated.

 

Thank you in advance

 

 

1 ACCEPTED SOLUTION

Latoya
Kilo Guru

Add the following to the above format .split(' ')[0].concat(' ', 'HH:MM:SS');

For tomorrow at 1am time example: javascript: gs.daysAgo(-1).split(' ')[0].concat(' ', '01:00:00');

View solution in original post

5 REPLIES 5

Latoya
Kilo Guru

Add the following to the above format .split(' ')[0].concat(' ', 'HH:MM:SS');

For tomorrow at 1am time example: javascript: gs.daysAgo(-1).split(' ')[0].concat(' ', '01:00:00');