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
Memorable Member
Memorable Member

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
Memorable Member
Memorable Member

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

fraenK
Memorable Member
Memorable Member

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,985)