943,537 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Unsolved
  • Views: 2357
  • ColdFusion RSS
Aug 7th, 2008
0

Date and Time

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
apsara is offline Offline
1 posts
since Aug 2008
Dec 6th, 2008
0

Re: Date and Time

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
Reputation Points: 12
Solved Threads: 36
Posting Pro in Training
freshfitz is offline Offline
436 posts
since Sep 2008
Jan 7th, 2009
0

Re: Date and Time

Hi,

What happens if you dont put the mask in?

Does it still display 12AM?

JM
Reputation Points: 10
Solved Threads: 1
Newbie Poster
jedimatt is offline Offline
20 posts
since Jan 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: Database return records issue
Next Thread in ColdFusion Forum Timeline: stop page refreshing





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC