cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GUOGUO
Post Patron
Post Patron

How to convert date display in Excel to date format in List?

Could you please help on the following error message? Thanks in advance .

GUOGUO_0-1627829374979.png

 

I tried with two expression in Compose.

1

div(add(div(float(ticks('LIB Global Item Status')),10000000),-59926435200),86400)

GUOGUO_1-1627829374828.png

 

2formatDateTime(addDays('1899-12-30', int(items('Apply_to_each')?['LIB Global Item Status'])),'MM/dd/yyyy')

 

7 REPLIES 7
eric-cheng
Solution Sage
Solution Sage

 

Hi @GUOGUO ,

 

You screenshot is blurry on my sceen but your formula should work.

 

formatDateTime(addDays('1899-12-30',int(items('Apply_to_each')?['LIB Global Item Status'])),'MM/dd/yyyy')

 

Screenshot_20210802-012644_Chrome.jpg

Screenshot_20210802-012555_Chrome.jpg

Do you have blank values in your date column? Please refer to this where you can use an IF() to ignore blank values.

 

if(equals(items('Apply_to_each')?['LIB Global Item Status'],''), '', formatDateTime(addDays('1899-12-30',int(items('Apply_to_each')?['LIB Global Item Status'])),'yyyy-MM-dd'))

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

JuanPJesusG
Frequent Visitor

Hi,

Use the following function to convert excel date to usable date:

formatDateTime(addDays('1899-12-30',[Insert your date field here],'MM/dd/yyyy')

 

For sharepoint you should save dates like this 'MM/dd/yyyy' if you wants minutes and hours use 'MM/dd/yyyy HH:mm'

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Powerplatform01
Post Patron
Post Patron

@GUOGUO 

No worries you can. Watch this video to resolve your issue.

Also request you to please subscribe this channel.it helps me a lot

https://youtu.be/NLEMPn-T3ns

Thanks a lot ,Erric.

Could you please told me that what "Apply_to_each" in the formula indicate?

eric-cheng
Solution Sage
Solution Sage

Hi @GUOGUO ,

 

When you use a List rows in table, it can return 0, 1 or even 100 rows.  Therefore, you will always need to loop through the output.   The Apply_to_each is a loop for each returned row from your List rows in table.

 

Please try this.

 

1) After your List rows in a table action, add a Compose action.  It should look like this.

 

ericcheng_0-1627887978450.png

 

2) In your Compose, select your LIB Global Item Status column

 

ericcheng_1-1627888068203.png

3) Flow will automatically add a Apply for each loop for you.

 

ericcheng_2-1627888101987.png

 

If you run the flow now, the loop will iterate through each row within your Excel spreadsheet.  

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

 

 

 

Hi Erric,

Thanks for your reply.

Though , the list rows present in a table  must be involved into a Apply to each component in my flow. 

When i created  "List Rows Present in a table ", the Apply to Each was added into the flow automatically.

GUOGUO_0-1627954937825.png

 

eric-cheng
Solution Sage
Solution Sage

Hi @GUOGUO ,

 

I can't see the top of your flow but if you have a Get Tables, then yes, you will have an Apply for Each before the List rows because there can be multiple tables.  You will then have another Apply for Each (Apply for Each 2) after List rows.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,643)