Calculate time on the basis of manipulated/custom time values
Hello there,
I have the following requirement: I need to set a start time and an end time based on a condition and calculate the duration in between.
Example:
If condition A is met ---> Start time = <date> 08:00:00
If condition B is met ---> Start time = <date> 12:00:00
Problem: When I build my datetime and use the function datetime_diff, I get NULL as a result:
How can I solve my problem?