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

Converting Date When Inserting Row

Hi,

 

I'm brand new to Flow. I am working on building a flow that pulls a list from Sharepoint to Excel. Everything is working fine except I can't figure out how to convert the date format of the Modified column in Sharepoint from UTC to a short date for each row insterted in Excel. I think I understand the expression I need to do it, but I can't figure out the correct syntax for it. Any help is appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Converting Date When Inserting Row

To convert from a date/time to just a day with time set to 12:00 AM, use the "startOfDay" expression:

startOfDay([Date form SharePoint column from dynamic content], 'd')

 

To simply format the date use the formatDateTime expression:

formatDateTime([Your SharePoint Date Column from Dynamic Content], 'd')

 

The 'd' parameter specifies the short date format.

 

In addition, you'll also want to format the column in your Excel table appropriately.  I'm not sure you even need to do anything for formatting in Flow if you set a date format for you Excel column.

 

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Converting Date When Inserting Row

To convert from a date/time to just a day with time set to 12:00 AM, use the "startOfDay" expression:

startOfDay([Date form SharePoint column from dynamic content], 'd')

 

To simply format the date use the formatDateTime expression:

formatDateTime([Your SharePoint Date Column from Dynamic Content], 'd')

 

The 'd' parameter specifies the short date format.

 

In addition, you'll also want to format the column in your Excel table appropriately.  I'm not sure you even need to do anything for formatting in Flow if you set a date format for you Excel column.

 

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

GerryL
Level: Powered On

Re: Converting Date When Inserting Row

Hi, Thank you! You're right. Once I set the column in the target excel table to date it converted the field on its own. I was overthinking it.

Helpful resources

Announcements
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!

Users Online
Currently online: 87 members 5,264 guests
Recent signins:
Please welcome our newest community members: