cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mo_Islam
Helper III
Helper III

Show time for a country

Hi,

 

How can I show time for a specific country if I know which UTC value to show.

 

e.g. I want to show the time based on UTC - 1 hour

 

I currently have a clock which shows Now(), but I want to change this based on UTC.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Mo_Islam ,

 

According to your description, the point is the TimeZoneOffset () function and the DateAdd() function.

 

I've made a test for your reference:

 

1\ Add a label control and set its Text property to:

Now()           // This is local time.

 

2\ Add a label control and set its Text property to:

DateAdd(Now(),TimeZoneOffset(Now()),Minutes)   // This is UTC time.

 

3\ Add a label control and set its Text property to:

DateAdd( DateAdd(Now(),TimeZoneOffset(Now()),Minutes),-1,Hours)  // This is UTC time – 1 hour

 

4\ The result is as follows:

v-xiaochen-msft_0-1608687428129.png

 

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @Mo_Islam ,

 

According to your description, the point is the TimeZoneOffset () function and the DateAdd() function.

 

I've made a test for your reference:

 

1\ Add a label control and set its Text property to:

Now()           // This is local time.

 

2\ Add a label control and set its Text property to:

DateAdd(Now(),TimeZoneOffset(Now()),Minutes)   // This is UTC time.

 

3\ Add a label control and set its Text property to:

DateAdd( DateAdd(Now(),TimeZoneOffset(Now()),Minutes),-1,Hours)  // This is UTC time – 1 hour

 

4\ The result is as follows:

v-xiaochen-msft_0-1608687428129.png

 

 

Best Regards,

Wearsky

If my post helps, then please consider Accept it as the solution to help others. Thanks.

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,309)