Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Convert time to a set timezone

Posted on by
Hello:
 
I am having a simple issue, but I don't know if there's a way to configure this without flows
 
So, I built two dropdowns where the user will select an hour and minutes to host sessions. My issue is that we have users from different timezones, but whatever they choose, I would like to have that value converted to the equivalent in CET timezone in the dataverse table. Basically, this is the formula:
 
Set(
    _SessionDateTime, 
    DateTimeValue(Concatenate(Text(_dateSelected, DateTimeFormat.ShortDate), " ", sessionTimeHour.SelectedText.Value, ":", sessionTimeMinute.SelectedText.Value))
);
 
Any idea how this could be done?
 
Thank you in advance
Categories:
  • Suggested answer
    SaiRT14 Profile Picture
    SaiRT14 1,334 on at
    Convert time to a set timezone
    You can use the DateAdd function to apply the timezone offset. Assuming the users select time in their local timezone, 
    Set(
        _SessionDateTime, 
        DateAdd(
            DateTimeValue(
                Concatenate(
                    Text(_dateSelected, DateTimeFormat.ShortDate), 
                    " ", 
                    sessionTimeHour.SelectedText.Value, 
                    ":", 
                    sessionTimeMinute.SelectedText.Value
                )
            ), 
            CETOffset(), 
            Minutes
        )
    );
     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard