cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoeChanUK
New Member

Entering date and time

Hi. I wonder if someone can give me some tips. I'm new to PowerApps, and have been trying to create a form which includes dates and times. In my mind, I would like the data to be stored on SharePoint, and a workflow will run so that when someone submits a form, it goes through an approval process. 

 

My question is about the time. What is the best way to do this? At the moment I have a field for hour and another field for minutes, so data validation needs to be performed on these two fields. Also, how can I get the time stored properly when the form is submitted and stored on SharePoint? For instance, is it possible to store the data as hh:mm? 

 

One last thing, am I still correct that it is currently not possible to link PowerApps to a shared Outlook calendar? 

 

Many thanks in advance for your help.

5 REPLIES 5
DavidJennaway
Solution Supplier
Solution Supplier

In general, I'd prefer to use DateTime field, as that will work with any date/time manipulation functions, and can be used by date/time controls that have built-in validation to ensure a valid date and time is entered.

That said, these fields necessarily have a date and a time component, so if you solely wanted a time, with no date component, then the existing controls aren't any use, so you could go for creating custom fields. If you want to do any time manipulation or comparison, I'd store the values numerically (probably one field for hours, and one for minutes), but if you don't need any manipulation or comparison you could store the values in a text field as hh:mm. Either way, you'd need to do some validation of the input

Hi, thanks for this. 

 

How do I store the date/time value using "date & time" format on SharePoint if I have date (I have a date picker on this), hour and mins as separate fields on PowerApps? 

 

Thanks.

v-xida-msft
Community Support
Community Support

Hi @JoeChanUK .

Do you add two separated fields in your SP list to store the Hours value and Minutes value?

Why not take a try with the Date and time type field (including Time value) within your SP List?

 

Based on the needs that you mentioned, I think the Date and time type field (including Time value) could achieve your needs. On your side, please create a Date and time type field as below:

1.JPG

Then generate a new app based on your SP list, the Date and time field would be rendered in Edit form as below:

2.JPG

Then when you add new record, you could specify the Date value along with Time value from above Date time field data card.

Note: Please make sure the Time zone of your SP Site is set to same Time Zone as your local PC, so the submitted date time value from your app would be the same as that stored in your SP List. Please set the Time Zone of your SP Site as below:

3.JPG

 

In addition, do you want to create a connection to a Shared Outlook Calendar from PowerApps app? I afraid that there is no way to achieve your needs in PowerApps currently.

Currently, within PowerApps, we could only use following three Outlook Calendars:

4.JPG

 

Best regards,

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

Hi, 

 

Many thanks for this, I will do that. 

 

I have been messing around with PowerApps to find my way round, and I have created the form first instead of the SharePoint list. I have now created a connection between the two, but not entirely sure how to map each field against a specific column on SharePoint list. (I used to create Access databases hence I have that idea)

 

Also, I am hoping to have the form created for users to fill in, but I don't need them to see the forms submitted by other users. Is it easy to do that? 

 

Thanks again.

Anonymous
Not applicable

Hi 🙂

 

I am having some problems with the hours and minutes form PowerApps to my sharepoint list.

 

I was cheking the Regional settings on sharepoint and PC and it seems to be everything ok.

 

Can you help me? That is something I could do?

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (72,256)