Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I am trying to create a field with half hour intervals from time field like this :
7:00 to 7:30
7:30 to 8:00
8:00 to 8:30
8:30 to 9:00
9:00 to 9:30
9:30 to 10:00........
I tried this:
Time(floor([TimeField],(1/48)),'hh:mm') & ' to ' & Time(ceil([TimeField],(1/48)),'hh:mm') as HalfHour Interval.
But it is giving me wrong output like this:
7:00 to 7:00
7:00 to 7:30
7:30 to 8:00
8:00 to 8:00
8:00 to 8:30
8:30 to 9:00
9:00 to 9:00
9:00 to 9:30
9:30 to 10:00
Kindly help me to get the correct output.
Thank You
If the value of TimeField exactly corresponds to the full hour, then Floor() and Ceil() will return the same number. Compare with
Floor(5) = Ceil(5) = 5
Instead, you could try
Time(Floor(48*TimeField)/48,'hh:mm') & ' to ' & Time(Floor(48*TimeField+1)/48,'hh:mm') as HalfHour,
HIC
If the value of TimeField exactly corresponds to the full hour, then Floor() and Ceil() will return the same number. Compare with
Floor(5) = Ceil(5) = 5
Instead, you could try
Time(Floor(48*TimeField)/48,'hh:mm') & ' to ' & Time(Floor(48*TimeField+1)/48,'hh:mm') as HalfHour,
HIC
Thankyouu so Much @hic 😊