cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Perez
Helper V
Helper V

time picker not showing the correct hour

Hi i  built a dfate picker with a date and two drop downs for Hours and minutes

my for mula in the hopures default: Text(Hour(Parent.Default),"00")

the Update filed of the data card: DatePicker.SelectedDate + Time(Value(HourDD.Selected.Value), Value(MinutesDD.Selected.Value), 0)

my hour filed have values 1-23 in the item property

 

i used this article to build it:https://www.spguides.com/date-time-picker-in-powerapps/

 

the thing is that when im selecting an hoour in the form, it is not reflected correctlly in Sharepoint, but 14 hours ahead, do you have any idea why???

 

 

image.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Perez 

Have you set the proper region for your list?

Also, it would be best to store your date as a UTC date/time.

How are you currently submitting the information?  It appears that it is in a form.  If so, what is the Update property of the datacard that contains the date and time pickers?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

9 REPLIES 9
RandyHayes
Super User
Super User

@Perez 

Consider changing the Default for your Hour dropdown to the following:

Text(
   Hour(
      DateAdd(Parent.Default, -TimeZoneOffset(Parent.Default), Minutes)
   ),
   "00"
)

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes ,

thanks for your reply, bbut it gave same results

Hi @RandyHayes 

thanks for your reply, but it gave same results

RandyHayes
Super User
Super User

@Perez 

What part of this are you concerned with?  That the value stored in SharePoint is 3, or are you not seeing the value in your app properly when editing that record?

If it is the first, the SharePoint list, then just change the regional settings of your site for the proper time zone.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes ,

when im selecting an hour in the app, after submission its showing the hour +14 in sharepoint, also when editing the record it will show the wrong vlaue rather than the one i typed.

RandyHayes
Super User
Super User

@Perez 

Have you set the proper region for your list?

Also, it would be best to store your date as a UTC date/time.

How are you currently submitting the information?  It appears that it is in a form.  If so, what is the Update property of the datacard that contains the date and time pickers?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Hi @RandyHayes ,

so i checked it and you were right my local time is +10 hours from the site regional setting.

how can i overcome it without changing rthe site region (its not my site).

 

RandyHayes
Super User
Super User

@Perez 

I'm still not sure what you want to correct - how the time appears in SharePoint, or how the time shows in PowerApps.  You can either store your time in SharePoint adjusted to the timezone of the list, and then either adjust in PowerApps to accommodate.  Or, store your time in UTC and then adjust in PowerApps (your list will already adjust because of the region settings).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes 

i finally got permissions to change the site regional settings and now its working correctlly.

thanks a lot for your support

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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