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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,648)