cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ezequiel
Level: Powered On

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!



ezequiel
Level: Powered On

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!



ezequiel
Level: Powered On

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!



ezequiel
Level: Powered On

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!

ezequiel
Level: Powered On

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!



Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,263)