Expand my Community achievements bar.

SOLVED

Set the start time of a converted project

Avatar

Level 3

Trying to set the time of projects converted from issues using automation to 9:00am.

We have an Update Record Module > Record Type Project > Planned Start Date Field.

setHour(35.plannedStartDate;9)

 

This works and changes the hours but the minutes still use whatever minute it was when the project was created. We tried to add setHour(35.plannedStartDate;9),setMinute(35.plannedStartDate;0) but it fails.

 

Anyone know how I can accomplish this?

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Tracy_Parmeter it's about as clear & intuitive as mud (in my opinion), but this should do it:

{{setMinute(setHour(35.plannedStartDate;9);00)}}

 

If someone else can explain to me why they need to be nested like that, I'm interesting in soaking in that info.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

@Tracy_Parmeter it's about as clear & intuitive as mud (in my opinion), but this should do it:

{{setMinute(setHour(35.plannedStartDate;9);00)}}

 

If someone else can explain to me why they need to be nested like that, I'm interesting in soaking in that info.

Avatar

Level 10

According to ChatGPT:

  1. The code starts with the "plannedStartDate" variable or property, which presumably contains a date or timestamp value.

  2. The "setHour" function is called on the "plannedStartDate" value, with 9 as the second argument. This means that the "setHour" function will set the hour of the timestamp to 9.

  3. The result of step 2 is then passed as the first argument to the "setMinute" function, with "00" as the second argument. This means that the "setMinute" function will set the minute of the timestamp to 0.

  4. The final result of the code is the updated timestamp with the hour set to 9 and the minute set to 0.