Peculiar date issue - Backend workflows + server script

Hi everyone - thanks for taking the time to read.

I have an issue that I can’t debug and wondering if anyone can see the solution. Any help hugely appreciated!

Am using backend workflows to create tasks recursively - all working fine. The task has a date which is the issue.

The user sets a text field in the template, and the workflow looks up the relevant date for each time it’s run. For this I’m using a server script, this is working for all fields except one.

The ones that are working for are all set by a date input field. Just date, no time.

The one which is not working is the ‘current date/time’. I can see that seems to be a format issue - which seems to be caused by the presence of a time other than 00:00. But any attempt to remove this hasn’t worked.

Here’s what I’ve tried:

  • Sending Current date/time as a parameter for the backend workflow and referencing that
  • Current date/time: rounded down to day
  • Populating a hidden input field with the current time and referencing that
  • Formatting the date - but this errors as it turns into a string rather than date.

I suspect this is one of those things where a tiny amend will make it function, but I’ve read everything I can find and no luck. Does anyone have any guidance they could share? Perhaps I’ve missed something?

Thanks all!
Rob

1 Like

Update: I am an idiot. I missed .value from the end of my script.
Job done!
:slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.