Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?


Embedding to/from dates in formula (for subject line of email)


Hello experts! I have created a workflow and need to email the output with a subject line of "Great data from 1/4/19 to 2/28/19". The dates are the beginning and ending dates of one of the variables within my workflow. These dates will change every time I run the report.Today the dates will be 1/4/19 to 2/28/19, next week the dates will be 1/7/19 to 2/28/19, then 1/8/19 to 2/28/19, etc.


I created a new variable of "Report Subject" so I could use that as the field for the email subject line. I tried "Great data" and min([date]) "to" max([date]) as the expression with no luck because the date is not a numeric field, it is a datetime field. Does anyone have advice for how to build this expression?


Thank you!

ACE Emeritus
ACE Emeritus

Hello @Empower49,


First, run the data through a Summarize tool to generate min and max date values


Then, create the variable and use the DateTimeFormat expression to generate the relevant strings within your formula... something like

"Great data from " + DateTimeFormat([minDate],"%m/%d/%y") + 
" to " + DateTimeFormat([maxDate],"%m/%d/%y")

Assuming your output from the Sumarize tool had [minDate] and [maxDate] for the calculated min/max dates.

Hope that helps!


Thank you so much John! This is perfect. I appreciate you sharing your expertise with a newbie!