
Announcements
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
| Row | LastRefresh |
| 0 | 7/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
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.