ATF : Set date and time as dynamic field value

tiasha123
Tera Contributor

Hi ,

I want to set the planned start and end date along with time as the field value in ATF. How do I do that ? 

 

For Example: 

for Planned start date and time , I used = javascript: gs.nowDateTime().split(' ')[0].concat(' ', '00:00:00');

Planned end date, I used =  javascript: gs.endOfThisYear().split(' ')[0].concat(' ', '00:00:00');

 

But it is not setting the values. How to achieve this?

 

tiasha123_0-1737099416620.png

 

 

Thanks,

Tiasha

7 REPLIES 7

Chidanand_VK
Tera Expert

Hi @tiasha123 ,

Use the script javascript:gs.daysAgo(X) in place of value, as shown in the below screenshot (sets Today's date).

Chidanand_VK_0-1737354501094.png

 

Replace the X in brackets with any Number.

For Past Days:  1, 2, 3......

For Today: 0

For Future Days: -1, -2, -3......

 

If my answer helped you in any way, please mark it as helpful or correct.
 
Regards,
Chidanand Kalmani

Hi @Chidanand_VK ,

 

Thanks for your response . I want to set the time as well with the date. How do we do that ?

 

Regards,

Tiasha

Hi @tiasha123 ,

By using above script, it sets the Date as per the number added in the script and Current time by default.

 

If my answer helped you in any way, please mark it as helpful or correct.
 
Regards,
Chidanand Kalmani

Shaqeel
Mega Sage

Hi @tiasha123 

 

Use the following:

Shaqeel_0-1737370150467.png

 

 

It will set the date in future.

If you need to set date in past just remove the negative sign.

 

Regards

Shaqeel

 


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel