cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ezequiel
Microsoft
Microsoft

Date format question

Hi

 

I'm getting date from a SQL View and one if the field is a date (field called "startdate"). When I insert the field on an email I get this as example:

 

2019-09-25T16:00:00Z

 

I need this to be formated as 2019-09-25

 

What would be the expression to use?

 

Thanks,

 

Ezequiel

 

 

8 REPLIES 8
abm
Super User III
Super User III

Hi @ezequiel 

 

Add a compose step and use the expression below.

 

formatDateTime(variable['StartDate'], 'yyyy/MM/dd')

 

Above variable['StartDate'] map your StartDate from SQL View property.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Thanks for the reply. I'm not very familiar with the use of a Compose Step. I followed your suggestion but I'm stuck in "map your StartDate from SQL View property". Can you provide some additional details? Thanks!

 

Thanks!Capture.JPG

 

 

abm
Super User III
Super User III

Hi @ezequiel 

 

Thanks for the quick reply. Try that in Apply Each loop so that you can access the start date property.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

I tried that but I'm facing this problem: I see the field "StartDate" within the dynamic content, but if I try to write the expression formatdatetime and try to get the field "StartDate", I don't see it. Sorry for the basic question....but what Am I doing wrong?

 

Thanks!

 

Capture1.JPG

 

Capture2.JPG

abm
Super User III
Super User III

Hi

 

You can see two tabs there Dynamic Content and Expression

 

Click the expression and type formatDateTime()

 

Next place the cursor between the brackets of formatDateTime()

 

Next click the Dynamic Content. Click the Start property. This should be placed inside the above brackets of the expression function.

 

Hope it make sense.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

The  problem is when I go back to the Dynamic Content I don't see the StartDate Property. This is what I see:

 

Capture2.JPG

 

I only see the StartDate Property when I click on the Dynamic Content tab without typing formatdatetime ():

 

Capture1.JPG

 

Any clue what Am I doing wrong?

 

Thanks and sorry again for the basic questions!

@abm...for some reason I can't reply over a private message. Skype works for me...My user name is ezequielsapoznik...at your convenience.

abm
Super User III
Super User III

Hi @ezequiel 

 

Thank you for the discussion. If you still need help please let me know. 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (70,908)