Apr 26, 2023 12:14 PM
Hi All,
Arranging a weekly report to be sent, but would like to include the Date it was sent in the subject line.
I can select Expected Trigger time as an option:
And when I click on it, I have the option to Edit or Modify the token:
However, beyond that, I don't have a clue how I can make this:
look like this:
Any ideas?
(thanks in advance for the assistance!)
Apr 26, 2023 01:58 PM - edited Apr 26, 2023 02:03 PM
Create a new field called Email Date (or whatever) and use the DatetimeFormat formula to pull the month date year from Expected Trigger Time.
DATETIMEFORMAT({Expected Trigger Time}, ‘YYYY-MM-DD’) should get you what you want. Then use the the Email Date field in your automation.
Apr 26, 2023 04:21 PM
Hi there, I have similar questions regarding sending out "Actual trigger time" in an automated slack message. it returned the whole time string as GrahamW showed. I used to format by using the following syntax :
<!date^timestamp^token_string^optional_link|fallback_text>
while
Do appreciate if anyone could offer help how to format the date for "Actual trigger time" or "Expected trigger time". Thank you in advance! 😊
Apr 26, 2023 04:30 PM - edited Apr 26, 2023 04:36 PM
You can use an automation script to produce the date timestamp as a formatted text string. I give a detailed explanation (including full code) here.
Using a script means that you can avoid having a helper field that uses NOW() or TODAY(). Avoiding those formula functions is a good idea anyway because NOW() is notoriously inaccurate. Plus, those functions can slow down your base because they recalculate even when no other data in your base has changed.
Apr 26, 2023 06:57 PM
Oof! Thanks for the reply Kuovonne, but you lost me at
Where would I even start entering that in. I am very unfamiliar with scripts...
Apr 26, 2023 07:14 PM
Thanks Kuovonne. Will try out soon. 🙏
Apr 26, 2023 09:31 PM
@GrahamW wrote:Oof! Thanks for the reply Kuovonne, but you lost me at
Where would I even start entering that in. I am very unfamiliar with scripts...
Add a scripting action to your automation after the trigger but before where you want to use the formatted date. Then type the script in the scripting editor.
Did you read the full article? It has line by line instructions including where to put that function, and the full code at the end.