Search code examples
powerapps

PowerApp convert value datetime


My excel data is 8/1/2022 7:55:06 AM and i have change format to time (locale US). In PowerApps i'm using Text(DateAdd(ThisItem.Checkin,TimeZoneOffset(),Minutes),ShortTime) For file <5000 rows is correct format 7:55:06 AM But with excel file over 5000 rows it show value 44776.4357060 How can i convert 44776.4357060 to time format?


Solution

  • Excel date/time numbers are based on the number of days since its epoch, and the time component is the fractional part. To convert that value into a time format, you can use the Time function and pass the number of milliseconds that the fraction represents:

    Time(0, 0, 0, 0.4357060 * 24 * 60 * 60 * 1000)