Timer with start date and time in workflow is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 06:30 PM
Hi @Ravi Chandra_K @Ankur Bawiskar
I am using a timer with wait for condition as start date and time (PST hours). I used the below script for start date condition and it worked but when I changed variable type to Date/Time, the timer condition is not working when user selects date and time (PST hours). Could someone please help with the below script?
var start_date = new GlideDateTime(current.variables.start_date);
answer = gs.dateDiff (gs.nowDateTime(), start_date,true);
The above script is working for selected date but not working for data along with time (pst hours). Please provide your suggestions.
Do I need to set any time zone like mentioned in the screenshot to trigger start for date and time? Please assist.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 09:00 PM
try this
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 09:34 PM
The link which you shared is useful for setting up a selected date to trigger the workflow but in my case, the workflow should trigger based on user selection in catalog form with respective to start date and exact time mentioned by user. Any suggestions on how to achieve this condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 10:10 PM
Did you check that link has any place to use dynamic value for date/time?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 10:32 PM - edited 08-10-2023 10:46 PM
@Ankur Bawiskar I could not find in link to use dynamic value but my below script is working for start date and exact time but I am not sure which time zone it is working. How can I check on what time zone the workflow triggered?
var start_date = new GlideDateTime(current.variables.start_date);
answer = gs.dateDiff (gs.nowDateTime(), start_date,true);