Help

How do I set a date field to NOW() in automation?

Solved
Jump to Solution
4636 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Ruchika_Abbi1
7 - App Architect
7 - App Architect

I want to set a Date field to the current date time in an automation. I tried using a formula field (with NOW()) from a previous step in the automation to set this Date field but the automation fails with the error;
Field "Date" cannot accept the provided value: Could not convert string to date.

No amount of formatting of the formula field is helping. 

1 Solution

Accepted Solutions
Alexey_Gusev
12 - Earth
12 - Earth

Hi,
Using NOW() to set current time, you should be aware that it updates every 5-10 minutes. So, the minute value won't be precise to a single minute. Also, it can cause delay of triggering automation.
I would set one-liner script step and use output for field value in next Update step. Precision+No delay+No extra column.
 

output.set('now',new Date().toISOString())

 here, 'now' is just a variable name, you can change it

See Solution in Thread

5 Replies 5

Hmm, weird.  Could you provide screenshots of your table and automation setup, or access to an example base where you're encountering this issue?

I was able to use an automation to paste the value from a formula field with "NOW()" into a Date field without that error and so I think my setup's different from yours:

Screenshot 2023-05-04 at 10.28.42 PM.png

Screenshot 2023-05-04 at 10.28.36 PM.png
Link to base

Alexey_Gusev
12 - Earth
12 - Earth

Hi,
Using NOW() to set current time, you should be aware that it updates every 5-10 minutes. So, the minute value won't be precise to a single minute. Also, it can cause delay of triggering automation.
I would set one-liner script step and use output for field value in next Update step. Precision+No delay+No extra column.
 

output.set('now',new Date().toISOString())

 here, 'now' is just a variable name, you can change it

This worked, thanks!

garyj
4 - Data Explorer
4 - Data Explorer

Thanks for the solution

Thanks for this solution - simple, efficient and genuis! 🙂