function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swarnava SahaSwarnava Saha 

Workflow Action to Update field based on User's current local time

I have created a Workflow Rule with a workflow action to update a datetime field base on the user's current timezone's datetime (not the system timezone).
I want to use the below formula in my workflow action:
Datetime now = Datetime.now(); Integer offset = UserInfo.getTimezone().getOffset(now); Datetime local = now.addSeconds(offset/1000);
I am writing the formula in Workflow as:-
now.addSeconds( UserInfo.getTimezone().getOffset(Datetime.now())/1000 )
but it is showing some error How can I resolve this?
Swarnava SahaSwarnava Saha
This This error is coming when I check the syntaxerror is showing up in my case