web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Formatting for Date An...
Power Apps
Answered

Formatting for Date And Time in Data Table from Excel Connected table

(0) ShareShare
ReportReport
Posted on by 23

I have spent 5 hours scouring the interwebs for the answer.

 

I have an Excel table with a single row showing the LastRefresh of it's dataset. 

I want to display this date and time in my Powerapp. 

 

Here is what it looks like in Excel

RowLastRefresh
07/7/2021 7:16 PM

 

When I format the value in Excel to Date/Time like above, it shows no data in the powerapp

When I format the value in Excel as General it changes to : 44547.763045

This does show up in the power app but is not useful to my users.

 

I can get the date ONLY to show up using 

Text(DateAdd(Date(1900, 1, 1), ThisItem.LastRefresh - 2, Days),"[$-en-US]mm/dd/yyyy")

 

But if I add the time to the end of the format I get 00:00:00, probably because I'm doing the DateAdd against a date only so it uses midnight from my Date.

 

I've tried to change the text of the field in the Data Table.

I've tried DateTimeValue(ThisItem.LastRefresh) : shows blank

I've tried Text(ThisItem.LastRefresh, "mm/dd/yyyy hh:mm:ss") : shows 44547.763045

I've tried Text(ThisItem.LastRefresh, LongDateTime24) : shows 44547.763045

 

I've even tried the convert to local dataset using the Screen.OnVisible command creating a FormattedLastRefresh column : 44547.763045

 

I've tried to do a lookup from a Label : all the same as above.

 

I am at a LOSS!

 

Thank you, in advance, for any help you can provide.

 

Regards,
Matt

Categories:
I have the same question (0)
  • Verified answer
    MattSuderman Profile Picture
    23 on at

    Solved it!

     

    I changed the field value in excel to :

    =+MONTH(LastRefresh[LastRefresh]) &"/" & DAY(LastRefresh[LastRefresh]) &"/" & YEAR(LastRefresh[LastRefresh]) &" " & HOUR(LastRefresh[LastRefresh]) &":" &MINUTE(LastRefresh[LastRefresh]) &":"& SECOND(LastRefresh[LastRefresh])

     

    Basically making it a text field.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard