I am trying to pull times out of a mysql database and then convert them to the time of day using TimeFormat.

#TimeFormat(Recordset3.timeOne, "h:mm tt")#

My problem is once I add the "timeformat" all the times turn to 12AM regardless of what the time is in the database.

Thanks for any help :)

I think you have to use or capital HH for 24 hour

* h: Hours; no leading zero for single-digit hours (12-hour clock)
* hh: Hours; leading zero for single-digit hours (12-hour clock)
* H: Hours; no leading zero for single-digit hours (24-hour clock)
* HH: Hours; leading zero for single-digit hours (24-hour clock)
* m: Minutes; no leading zero for single-digit minutes
* mm: Minutes; a leading zero for single-digit minutes
* s: Seconds; no leading zero for single-digit seconds
* ss: Seconds; leading zero for single-digit seconds
* t: One-character time marker string, such as A or P
* tt: Multiple-character time marker string, such as AM or PM
* short
* medium
* long
* full

Hi,

What happens if you dont put the mask in?

Does it still display 12AM?

JM

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.