I have a report in which I need to round timestamps to the half hour so that anything between 00 minutes and 29 minutes round to the hour and anything between 30 and 59 minutes round to the half hour. So, for instance, 12:00 - 12:29 are in the 12:00 time slot, and 12:30-12:59 are in the 12:30 time slot.
I think I have a good start and it is displaying correctly . . . for the most part. My problem is that it is not differentiating between AM and PM. So both 1AM and 1 PM are displayed as 01:00. I want them to display in the 24 hour format so that 1AM = 01:00 and 1PM = 13:00. Here is my formula so far. What am I missing?
WhilePrintingRecords;
timeVar tempTime := {service_req.appt_time};
If minute(tempTime) >= 30 then
tempTime := time(Hour(tempTime),30,0)
else
tempTime := time(Hour(tempTime),0,0);
totext(temptime,"hh:mm");
I think I have a good start and it is displaying correctly . . . for the most part. My problem is that it is not differentiating between AM and PM. So both 1AM and 1 PM are displayed as 01:00. I want them to display in the 24 hour format so that 1AM = 01:00 and 1PM = 13:00. Here is my formula so far. What am I missing?
WhilePrintingRecords;
timeVar tempTime := {service_req.appt_time};
If minute(tempTime) >= 30 then
tempTime := time(Hour(tempTime),30,0)
else
tempTime := time(Hour(tempTime),0,0);
totext(temptime,"hh:mm");