cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GUOGUO
Helper IV
Helper IV

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

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Users online (2,876)