I am working on a form which requires me to calculate difference between start and end time but it becomes an issue when end time is past midnight. Is there a way to do this calculation?
what controls resp. what is datatype of start time and end time columns?
what control resp. what is datatype of start date?
are they just texts?
is there any specific reason not to use date picker controls?
I affraid not using date picker resp. not entering full datetimes for both timepoints you are going to make yourself many troubles.
how is end time related to start start time? is it always next day?
how do you treat the case when start time and end time are just the same? is it the same day or is end time next day?
how do you treat the case when start time is before afternoon (AM) and end time is past afternoon (PM)? is it the same day or two different days?
I find when dealing with these types of situations, its best to reduce the problem to the basic units. So if you're only interested in the hours difference, then reduce the two time elements to hours. So, 7pm to midnight + any end time less-than 7pm. With this you can simply use a Calculate Date action to do the rest. The same approach can be used if you need minutes instead of hours.