cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Crios29
Frequent Visitor

How to read a DATE with a Gallery

 

Hi everyone,

 

I need your help, I'm trying to create a gallery from a Excel-Online, in the column "Report Sent", I have Date information, the issue is when PowerApps reading with a gallery this information...

Crios29_0-1638225488459.jpeg

 

appear like this:

PowerApps Galley.JPG

 What should I do with this problem? I tried change the format to "DateTimeFormat.LongDate", but nothing happens, thanks four time and help.

 

Best Regards,

Carlos

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Crios29 :

Date calculation in Excel is a form of sorting dates into a series, increasing by 1 every day, so that the date can be stored as a serial number that can be used for calculation. By default, the serial number of January 1, 1900 is 1, and the serial number of January 2, 1900 is 2, and the serial number of January 1, 2008 is 39448. This is because it is 39,448 days from January 1, 1900.So, using this principle, you can restore these floating-point numbers to date and time.

Text(
  DateAdd(
      Date(1900,1,1),
      Int(Thisitem.'Rpt Sent'*24*60),Minutes),
  DateTimeFormat.LongDateTime24)

Or

Text(
  DateAdd(
      Date(1900,1,1),
      Int(Value(Thisitem.'Rpt Sent')*24*60),Minutes),
  DateTimeFormat.LongDateTime24)

Best Regards,

Bof

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Crios29 ,

If you are using Excel, consider storing it as text, writing as (format depending on your region)

Text(YourDateValue,"dd/mm/yyyy")

and reading as 

Text(DateValue(ThisItem.YourDateField,"dd/mm/yyyy")

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

v-bofeng-msft
Community Support
Community Support

Hi @Crios29 :

Date calculation in Excel is a form of sorting dates into a series, increasing by 1 every day, so that the date can be stored as a serial number that can be used for calculation. By default, the serial number of January 1, 1900 is 1, and the serial number of January 2, 1900 is 2, and the serial number of January 1, 2008 is 39448. This is because it is 39,448 days from January 1, 1900.So, using this principle, you can restore these floating-point numbers to date and time.

Text(
  DateAdd(
      Date(1900,1,1),
      Int(Thisitem.'Rpt Sent'*24*60),Minutes),
  DateTimeFormat.LongDateTime24)

Or

Text(
  DateAdd(
      Date(1900,1,1),
      Int(Value(Thisitem.'Rpt Sent')*24*60),Minutes),
  DateTimeFormat.LongDateTime24)

Best Regards,

Bof

Thanks Bof for your explanation, It works perfect!!

 

Best Regards,

 

Carlos

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,415)