Hello
I cannot get rid of this formatting when I send an email via flow using SharePoint list items:
2021-04-06T14:13:00Z
I tried the 'convert time zone' action, but unsure how I use the converted base time in my email.
I also tried the expression in the email body my value is "Date&Time" :
Solved! Go to Solution.
Hi @Anonymous
Unfortunately, you have supplied the expression @formatdatetime(triggerBody()?[‘Date_x0026_Time’],’dd/MM/yyyy’) as a string so it does not evaluate.
triggerbody() also suggests that Date_x0026_Time comes from your reoccurrence trigger? I suspect it is from get items?
If I do compose value:
I get the whole array of values for get items
If I want to get Accessory from the body I must use
Returns:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here
Hi @Anonymous
I've covered some of the datetime formatting here in a recent blog.
You are right to be considering formatdatetime however I would check how you have called your dynamic content. When you build an expression you can switch back to dynamic content and select an existing value, this will prevent you making an error with the variable or action output name.
An expression from Get Item for instance would be outputs('Get_item')?['body/Title']. You appear to be simply listing the key name and nothing more.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here
HI @DamoBird365
Thanks
Slightly lost - and you are right, when I try to write FormatDateTime in the expression the only 2 options I have is body and value, and I am unable to select my field called Date&Time
I thought this would work, but again lacking the full understanding:
I create a 'Initialize variable' set it as vDateTime and 'Type' as String
When I come to set the variable, i can see the Date&Time in the value field, but as soon as as I do an expression and use
Hi @Anonymous
triggerBody()?['Date_x0026_Time'] will be null because it's not tied to an actual value, you must have a typo in there somewhere.
If you can pick your date and time during the initialisation of a variable, you can then peek at the code (via elipses of the action) and you will be able to see the expression for the field you are referring to. There's no need for a variable but if you are new, this is a good way to learn as it will still run. In fact, you could call your variable with formatdatetime but make sure you build the formatdatetime in the expression builder and then switch back to the dynamic content tab when you are ready to choose the dynamic value you are looking to apply the formatdatetime expression on.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here
Hi @DamoBird365
Hmm, havent played around with Flow as much as I'd like
I've tried to do the following but still doesnt work:
After get Items action
I have a Initilize variable, Called vDateTime
Type: String
in the value I had set it as null, so thought this is where I set the value, I can select Date&Time but as soon as I click Expression and type in FormatDateTime() clicking inside the brackets I only have 2 options in dynamic content body and value.... clearly im missing the bigger picture here
@DamoBird365
I have also tried the following:
It works, but with this set up in the Compose inputs I have:
@formatdatetime(triggerBody()?[‘Date_x0026_Time’],’dd/MM/yyyy’)
When i get the email all I get is:
@formatdatetime(triggerBody()?[‘Date_x0026_Time’],’dd/MM/yyyy’)
Rather than the actual date, both the above things should work, but I cannot spot what I am doing wrong
Hi @Anonymous
Unfortunately, you have supplied the expression @formatdatetime(triggerBody()?[‘Date_x0026_Time’],’dd/MM/yyyy’) as a string so it does not evaluate.
triggerbody() also suggests that Date_x0026_Time comes from your reoccurrence trigger? I suspect it is from get items?
If I do compose value:
I get the whole array of values for get items
If I want to get Accessory from the body I must use
Returns:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien
P.S. take a look at my new blog here
User | Count |
---|---|
25 | |
15 | |
14 | |
10 | |
9 |
User | Count |
---|---|
51 | |
29 | |
28 | |
25 | |
23 |