Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Date time

Hi,

I have my time saved as military time:
13:00:00.000
what I want to display is this:
1:00 PM

right now I get this which is wrong:
13:00 PM

not sure how to fix it to display it correct like this:
1:00 PM

 <input type="text" name="TimeOccurredTxt" id="TimeOccurredTxt" value="<Cfoutput>#TimeFormat(QGetLogEntry.TimeOccurred,'HH:mm tt')#</cfoutput>" style="height:23px;width:195px;text-align:center;"/> 

Open in new window

0
lulu50
Asked:
lulu50
  • 2
1 Solution
 
erikTsomikSystem Architect, CF programmer Commented:
just chnage the format to this
#TimeFormat(QGetLogEntry.TimeOccurred,'hh:mm tt')#
0
 
erikTsomikSystem Architect, CF programmer Commented:
Also to remove a leading zero just use this format

#TimeFormat(QGetLogEntry.TimeOccurred,'h:mm tt')#
0
 
lulu50Author Commented:
Thank you
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now