cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Getting data from datepicker

Hi again, im slowly getting along with my app, thanks to help from people in here, and youtube videos(shane young)

Now my app will only show the records matching the current user.

On the frontpage it should be showing the headlines from entered data.

User:

Customer:

Kilometers driven:

Date:

But i cant pull the date from the Datepicker.

and then i would like to also extract the difference in time from Start_Datepicker and End_Datepicker

ive attached 3 screenshots from the screens in the app.

 

The user

will land on the gallery, then add new, current user is automaticly entered by the app, then select start date and time. he can also enter finished time. he can also edit this later( not working at the moment)

Kunde = customer

Formål = purpose

Antal Km = kilometers driven.

 

Then he can edit the info. but the datepicker dont work here. ill have to figure this out afterwards.

 

But for now my problem is the issue, that i can't pull the data stored by the datepicker to show up on the gallery list..

i've watched video on youtube with shane young DateTime topic, but he mostly just show what you can do, but not exactly how to fix my problem.

Hope there is a kind soul which can help me with this subject.

Regards Henrik Nielsen

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Could you tell me

1)the data type of your start field?

2)what is your data source?
Please set it to date time type and includes time.

Usually for date time field, you should set like this:
1)datacard's Default:

ThisItem.fieldname

 datacard's Update:

DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0)

2)DateValue1(datepicker)'s DefaultDate:

Parent.Default

3)HourValue1(drop down for hour)'s Items:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

HourValue1(drop down for hour)'s Default:

Text(Hour(Parent.Default),"00")

4)MinuteValue1(drop down for minute)'s Items:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

 MinuteValue1(drop down for minute)'s Default:

Text(Minute(Parent.Default),"00")

8101.PNG

 

If you are not sure what data type of your field, you could show me your settings of this field in your data source.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @Anonymous ,

Could you tell me

1)the data type of your start field?

2)what is your data source?
Please set it to date time type and includes time.

Usually for date time field, you should set like this:
1)datacard's Default:

ThisItem.fieldname

 datacard's Update:

DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0)

2)DateValue1(datepicker)'s DefaultDate:

Parent.Default

3)HourValue1(drop down for hour)'s Items:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

HourValue1(drop down for hour)'s Default:

Text(Hour(Parent.Default),"00")

4)MinuteValue1(drop down for minute)'s Items:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

 MinuteValue1(drop down for minute)'s Default:

Text(Minute(Parent.Default),"00")

8101.PNG

 

If you are not sure what data type of your field, you could show me your settings of this field in your data source.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Hi, thank you for the help, had vacation last week, so thats why the late reply.

I changed the "1)datacard's Default:" from ThisItem.Default to ThisItem.fieldname.

rest of the fields had he values you listed.

the data is in a sharepoint list. ive attached a picture with the data types for each field.

Bruger = User

Start = Start

**bleep** = End

Kunde = Customer

Formål =Purpose

Antal Km = Range driven)

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (58,291)