cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GerryL
Frequent Visitor

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
Frequent Visitor

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

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

Users online (6,596)