cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Super User
Super User

Re: Date format question

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 blog
Microsoft
Microsoft

Re: Date format question

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

 

 

Super User
Super User

Re: Date format question

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 blog
Microsoft
Microsoft

Re: Date format question

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

Super User
Super User

Re: Date format question

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 blog
Microsoft
Microsoft

Re: Date format question

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!

Microsoft
Microsoft

Re: Date format question

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

Super User
Super User

Re: Date format question

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 blog

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,877)