• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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