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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DateTime displayed inc...
Power Apps
Answered

DateTime displayed incorrectly in gallery lookup

(0) ShareShare
ReportReport
Posted on by 222

Hi,

 

I have a gallery that lookups a value in the selected drop down list.

The date displays correctly, but the the time does not and the 'AM/PM' is also incorrect.  

Correct display :  17/04/2024 3:30pm

Current display: 17/04/2024 12:00AM

RVoller_0-1713317223962.png

In the gallery, I am using the following to display the date time value.

"Date: " & Text(
    DateValue(
        LookUp(
            'Eden Park Ticket Bookings-DEV',
            Fixture = EventDropDown.SelectedText.Value,
            'Fixture Date And Time'
        )
    ),
    "dd/mm/yyyy hh:mm AM/PM"
)
Datasource is a datetime field in a sharepoint list.
 
Kind regards

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @RVoller ,

     

    The point is TimeZone .The time in your App is the local time. When the time is saved to SharePoint, it will be converted according to the time zone set by your SharePoint Site. So the time you get is different from the time in the App.

     

    I think this link will help you a lot:

    Solved: Not able to capture current date and time in share... - Power Platform Community (microsoft.com)

     

    Best Regards,
    Bof

  • RVoller Profile Picture
    222 on at

    Hi,

    The time zone is correctly set. 

    I am trying solution 2 : 

    RecordCreatedDate:DateAdd(DateTimeValue(Ctime),X,Hours),

    I am not sure what ,X, is in the formula. My patch is as follows:

    ForAll(
    Sequence(12),
    If(
        IsBlank(varRecord),
        Patch(
            'Eden Park Ticket Bookings-DEV',
            Defaults('Eden Park Ticket Bookings-DEV'),
            {Fixture: FixtureTxt.Text},
            {'Fixture Details': DescriptionTxt.Text},
            {Reserved:"No"},
            {'Catering Required':"No"},
            {
                'Fixture Date And Time': DateAdd(DateTimeValue (
                    Concatenate(
                        EventDate.SelectedDate,
                        " ",
                        StartDropDown.SelectedText.Value
                    )
                ), X, TimeUnit.Hours
                )
            }
        ),ColEvent
    ))

    Also, the sharepoint patch is working correctly.  The time is saved correctly to the sharepoint list.  However, when displayed in the gallery, the only the time is incorrect.

  • RVoller Profile Picture
    222 on at

    Hi,

    I updated the gallery lookup and it works:

    "Date: " & Text(
                LookUp(
                'Eden Park Ticket Bookings-DEV',
                Fixture = EventDropDown.SelectedText.Value,
                Text('Fixture Date And Time',"dd/mm/yyyy hh:mm AM/PM")
            )
    )
    Thank you for your time.  It is appreciated.
  • Verified answer
    VishalJhaveri Profile Picture
    1,169 Moderator on at

     Text('Fixture Date And Time',"dd/mm/yyyy hh:mm AM/PM")

    This must definitely work.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard