Hello,
I am creating a workflow that is triggered when a survey is submitted. In the survey I have month and year as a question, I would like the feature attribute to be apart of the email, but it is displaying as a long string of numbers.
I have created the following expression and still now luck;
formatDateTime(triggerOutputs()?[body/feature/attributes/'Month_Year'],'MMM').
Solved! Go to Solution.
Survey123 captures dates in "Epoch" or "Unix" time, which is to say seconds or milliseconds since Jan 1 1970.
This causes all sorts of fun for conversions in other systems, in fact sometimes I'm not sure if the Survey123 feature classes knows quite how to handle it. Although that's partly timezone issues I'm sure, but I digress.
In my power automate fields I create an expression like:
addSeconds('1970-1-1', Div(triggerOutputs()?['body/feature/attributes/survey_date'], 1000), 'yyyy-MM-dd')
This takes any given date (in epoch time) coming from survey123 and returns a string like '2023-06-08', format as you please!
Survey123 captures dates in "Epoch" or "Unix" time, which is to say seconds or milliseconds since Jan 1 1970.
This causes all sorts of fun for conversions in other systems, in fact sometimes I'm not sure if the Survey123 feature classes knows quite how to handle it. Although that's partly timezone issues I'm sure, but I digress.
In my power automate fields I create an expression like:
addSeconds('1970-1-1', Div(triggerOutputs()?['body/feature/attributes/survey_date'], 1000), 'yyyy-MM-dd')
This takes any given date (in epoch time) coming from survey123 and returns a string like '2023-06-08', format as you please!
Thank you ! This worked for me!
I have the same issue, for some reason it is not working for me! Could you send me screenshots of your steps.
@beachcamp , I'm using this expression, but the date I'm getting (August 28, 5217) is not what is should be (February 16, 2024). Any thoughts?