0

I have a sharepoint online date field named DueDate of type Date/Time that allow to enter Date Only (without time).

And i choice field named DueDatetime with these values:-

12:00 AM

12:30 AM

1:00 AM

1:30 AM

2:00 AM

2:30 AM

3:00 AM

3:30 AM

4:00 AM

4:30 AM

5:00 AM

5:30 AM

6:00 AM

6:30 AM

7:00 AM

7:30 AM

8:00 AM

8:30 AM

9:00 AM

9:30 AM

10:00 AM

10:30 AM

11:00 AM

11:30 AM

12:00 PM

12:30 PM

1:00 PM

1:30 PM

2:00 PM

2:30 PM

3:00 PM

3:30 PM

4:00 PM

4:30 PM

5:00 PM

5:30 PM

6:00 PM

6:30 PM

7:00 PM

7:30 PM

8:00 PM

8:30 PM

9:00 PM

9:30 PM

10:00 PM

10:30 PM

11:00 PM

11:30 PM

now i want to create a calculated column which will add the number of hours based on the choice selection to the due date, is this possible? i do not want to modify the DueDate field to allow Date and time, since i am using Search web parts and i need to control the time value, seems by default the time in search will be shown in UTC and not based on the site collection time zone... so can i created such as calculated column?

1 Answer 1

2

Using VALUE(text), maybe we can accomplish this. See the formula and screenshot below.

=DueDate+VALUE(DueDatetime)

[DueDate] => Date type column

[DueDatetime] => Choice type column with choices described in the requirements

Please note, days can directly be added to a Date type column. Here VALUE() is returning a numeric value representing day from the mid-night.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.