cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amaccaig
New Member

Write Date to Excel File

I think Power Automate Desktop is a great tool and have been able to automate some complex processes, but right now I'm stuck on something so simple!  All I want to do is write a date into a cell in Excel, but whatever I try it writes text that Excel cannot recognise as a date.  I've broken this down to the simplest example, start with an Excel file with a date in cell A1, open this file in PAD, read the value of A1, add 7 days to it and write the result back to the same cell.  The result written back is text not a date.  Don't know if it makes a difference, but I am in the UK, using UK date formats.  I've checked everywhere, Windows, Office, Browser etc and all are set to the same UK language and date formats.  My test Flow is below along with the result after I run it.Screenshot 2021-03-18 095029.jpgScreenshot 2021-03-18 095630.jpg

 

I'm sure I'm missing something incredible simple, but can't work out what that is!

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
fraenK
Super User
Super User

I think the date in PAD should be set to a custom format (datetime to txt) to be recognized by Excel: yyyy-MM-ddThh:mm:ss

View solution in original post

4 REPLIES 4
fraenK
Super User
Super User

I think the date in PAD should be set to a custom format (datetime to txt) to be recognized by Excel: yyyy-MM-ddThh:mm:ss

View solution in original post

Thanks, tried adding a "convert datetime to text" step and with the custom format set to yyyy-MM-dd hh:mm:ss this now works as expected.  

 

Can't help thinking you shouldn't need to do this and somewhere inside PAD it is using US date formats regardless of local settings, but I can carry on now anyway

Yeah, unfortunately PAD by default is using a human readable date format which Excel doesn't recognize. There is still some way to go for Microsoft to bridge the gaps between Flow and Winautomation.

ali320322
Regular Visitor

when PAD reads system date, it assumes US format, reading the day as month, Month as day... 

 

for now, it works when i "Convert datetime to text" then:

- format to use: Standard

- Standard format: Full datetime (short time)

 

I hope it keeps working.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,258)