Hello, Everyone
I am using SharePoint Data-source and I want to have a Date Picker with Time Hour and Minute along with AM and PM Selector,
so what I did is this:
I changed the minute value picker into AM/PM selector, but I need Hour, Minute and AM/PM Auto Selected as per current time
Update Formula:
DateValue4_2.SelectedDate + Time(If(MinuteValue4_2.Selected.Value = "PM", 12, 0) + Mod(Value(HourValue4_2.Selected.Value), 12), 0, 0)
I need the Minute picker as well and the Hour Minute and AM/PM should auto pick by default as respect to the current time.
Need help for adding minute value.
Any Help
Can you please create a new thread for this issue
Hello, I used your code, and still need some help.
I am trying to setup a Sharepoint calendar where users can request equipment on a specific time (hour and quarter hour resolution), and date. I initially setup a Date and Time column in List Settings, but only the date was selectable when I created a form in PowerApps.
I then added drop down time picker boxes in my data card, but no matter what is selected on the form, it always populates the calendar with the date and time the form was submitted.
I have been trying to get this to work for a few days. I am happy to share any configurations and settings.
I would appreciate any help!
Thank you
The form selection shown on March 19 was for several days the following week, but it shows the date and time the form was submitted.
@MustH ,
Here is a post of mine explaining the process.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi @v-siky-msft
I want to have the Time Picker as Like in 12 hour format not in 24 hour because it will be really hard for the user to select the time for evening with the minutes too
like for 5:00 PM evening in 24 hour format it will be 17:00.
I would like my Hour values from 12,01,02,03,04,05,06,07,08,09,10,11
and minutes something like that so it will recognize that its PM not AM.
Please try using
Right( Text( Now()), 2)
This will give you the AM or PM portion of the current time. You can use this in the default section of the drop-down.
Thanks,
Hi @v-siky-msft ,
after checking the app, I am having a little bug in the Time Selector,
I have used your code under this if statement, and it shows 12 only every time, while the Minute value is working fine.
any help?
Hour Value > Update Code
If(ReqFrom.Mode=FormMode.Edit,Text(If(Mod(Hour(Parent.Default), 12) = 0, 12, Mod(Hour(Parent.Default), 12)),"[$-en-US]00"))
Minute Value: > Update Code:
If(ReqFrom.Mode=FormMode.Edit,Text(Minute(Parent.Default),"[$-en-US]00"),Text(Minute(VarCurrent),"[$-en-US]00"))
Hi @v-siky-msft ,
I have tried your formula, it's working perfect.
but when I edit the record the time picker should display the default selected time when I created the record and should display Current time when creating new record.
how to alter it? can you guide? for edit and new form?
@MH3 ,
What is the error on? Can you please pull this apart until it runs and identify which piece of code is causing the issue.
Also you might try this
Reset(RequestDate_DataCard1_2);
If(
RemForm.Mode=FormMode.Edit,
Patch(
'Travel Request',
{ID:ReqGal.Selected.ID},
ReqFrom.Updates,
InfoForm.Updates,
TripForm.Updates,
PrefForm.Updates,
RemForm.Updates
),
Patch(
'Travel Request',
Defaults('Travel Request'),
ReqFrom.Updates,
InfoForm.Updates,
TripForm.Updates,
PrefForm.Updates,
RemForm.Updates
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Sir @WarrenBelz ,
I saw your post, I just did what you have said in your post and updated my Update Property, according to my requirement, but still the time problem is there..
@MH3 ,
You are really getting adventurous to Patch a modified date control. If you go back to the link in my original post, you will see the Update property of the modified card - you should be able to work from that
DateControlName.SelectedDate +
Time(
If(
AmPmControlName.Selected.Value = "PM",
12,
0
) +
Mod(
Value(
HourControlName.Selected.Value
),
12
),
Value(
MinuteControlName.Selected.Value
),
0
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
WarrenBelz
146,518
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,751
Most Valuable Professional