How to use classic ASP to format TIME into HH:MM AM/PM format?

HiffStopoup

New Member
I am going nuts with this one. I have a mySQL table with a field of TIME type. I want to display a time such as 09:00 PM, and not 09:00:00 PM. I got this to work but think there must be a better way - monday = FormatDateTime(rs("d1s"), vbLongTime)response.write replace(monday,":00 AM"," AM")I've read through a lot of resources but can't put my finger on how best to do this. Any help would be appreciated. Also, if there is a way to eliminate the first digit if a 0, such as not 09:00 AM but 9:00 AM
 
Back
Top