Is there an easy way to convert a string which contains a time in 24h format to AM/PM format.
Note: I don't want to work with any type which is depending on the regional settings.
Thanks
Printable View
Is there an easy way to convert a string which contains a time in 24h format to AM/PM format.
Note: I don't want to work with any type which is depending on the regional settings.
Thanks
Try
format(datevariable, "Medium Time")
this should display your time in the 12 hour format with AM/PM indicator
H.
Try this ...
Code:strTime = Format(strTime, "hh:mm:ss am/pm")