Solved

Date time

Posted on 2014-04-04
3
239 Views
Last Modified: 2014-04-04
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
Comment
Question by:lulu50
  • 2
3 Comments
 
LVL 19

Expert Comment

by:erikTsomik
ID: 39978236
just chnage the format to this
#TimeFormat(QGetLogEntry.TimeOccurred,'hh:mm tt')#
0
 
LVL 19

Accepted Solution

by:
erikTsomik earned 500 total points
ID: 39978260
Also to remove a leading zero just use this format

#TimeFormat(QGetLogEntry.TimeOccurred,'h:mm tt')#
0
 

Author Closing Comment

by:lulu50
ID: 39978948
Thank you
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question