displaying the time

Posted on 2003-03-12
Medium Priority
Last Modified: 2010-05-01
I have an ASP page and I am using VbScript.

This line displays the estimated journey time in a table.

<td align="center"> <%=rsGlobalWeb("EstTime")%></td>

"EstTime" is a results of an SQL statement got by subtracting the start journey time from the destination time. Start and destination time are in the format, e.g. 19:25:00 AM (hour, minute, second) and so "EstTime" is in the format, e.g. 1:00:00 AM. But I want the "EstTime" to be displayed in the format 1:00

How do I just display the hour and minute of the results?  

Question by:PeteZ
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 8120359
Try this

Format(EstTime, "short time")
LVL 43

Accepted Solution

TimCottee earned 680 total points
ID: 8120375
Hi PeteZ,

<td align="center"> <%=FormatDateTime(rsGlobalWeb("EstTime"),vbShortTime)%></td>


Brainbench MVP for Visual Basic

Experts-Exchange Advisory Board Member

Expert Comment

ID: 8900229
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 49

Expert Comment

ID: 9664502
Moderator, my recommended disposition is:

    Accept TimCottee's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month11 days, 13 hours left to enroll

752 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