This formula works. Thanks for all your efforts.
if Left (totext({history.time}), 2) ="12" and
Right (totext({history.time}), 2) ="AM"
then
"00" + ":" + Mid(totext{history.time}),4,2)
else
if Right (totext({history.time}), 2) ="PM"
then
ToText (CDbl (Left(totext({history.time}),2)) + 12) + ":" +
Mid ( totext({history.time}), 4, 2 )
else
Left (totext({history.time}), 2) + ":" + Mid ( totext({history.time}), 4, 2 )