cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nottheOther
Helper II
Helper II

How to extract minutes and hours from Date and TIme Sharepoint column?

Hi,

 

How to extract hours and minutes for "Default" field in Hours and Minutes dropdowns from Date and Time SharePoint column?

 

1. SharePoint column is set to type: "Date and time", also "Include Time" option is set to Yes.

2. For saving I'm using Patch function:

ReqDate: DateE.SelectedDate + Time(Value(HourE.Selected.Value); Value(MinutesE.Selected.Value); 0);

3. For DefaultDate in datepicker this works fine:

LookUp(SPData; ID=eI; ReqDate)

4. Minute and Hour dropdowns are populated with items ["00";"01";...;"23"]

5. I've tried to set "Default" in minutes/hour dropdowns in this way:

Hour(LookUp(SPData; ID=eI; ReqDate))

but this doesn't work.

 

Any ideas what I'm doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
nottheOther
Helper II
Helper II

 

Text(Minute(LookUp(SPData; ID=eI; ReqDate)); "[$-en-US]00")
Text(Hour(LookUp(SPData; ID=eI; ReqDate)); "[$-en-US]00")

 

View solution in original post

2 REPLIES 2
nottheOther
Helper II
Helper II

 

Text(Minute(LookUp(SPData; ID=eI; ReqDate)); "[$-en-US]00")
Text(Hour(LookUp(SPData; ID=eI; ReqDate)); "[$-en-US]00")

 

View solution in original post

DavidJennaway
Solution Supplier
Solution Supplier

I think your problem is that you need to convert the output of the Time function to Text - e.g. 

 

Text(Time(Value(HourE.Selected.Value); Value(MinutesE.Selected.Value); 0)"hh:mm:ss")

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (29,169)