How to add hours to a given date

Certified Associate Developer

We are having a start date Eg. "2022-04-22 18:10:03"(Datatype: Date & Time) . I need to add 5 hours to the date and should provide me result as "2022-04-25 14:10:03".

Requirement: Should not include time between 19:01(7:01 pm) to 9:59(am) and week end (Saturday & Sunday).

Explanation: 4th April is Friday and the time given was 18:10(6:10pm). Total time taken is 50 min to complete 7pm on 4th April. As 23rd and 24th comes under week ends (Saturday & Sunday) we need to remove those date and time. Then we need to add date from 25th10:00am resulting in adding 4 hours 50 min on 25th.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data