RayT
asked on
Convert 24-Hour to 12-Hour
Is there a built-in function in Visual Basic 2005 that converts for example 1000 to 10:00a or 1800 to 6:00p? If not, how do I do this using Visual Basic 2005?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!!!
if tempTime >= 1300 then
tempTime = (tempTime - 1200)
tempString = tempTime.tostring
tempString = tempString.insert(2,":") & "PM"
else
tempString = tempTime.tostring
tempString &= "AM"
If this dont work its something very simular and ill try it in the morning to get it perfect for you im on my laptop which I dont have vs instealled on.