Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

displaying the time

I have an ASP page and I am using VbScript.

This line displays the estimated journey time in a table.

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

"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?  



0
PeteZ
Asked:
PeteZ
1 Solution
 
shijaz_aCommented:
Try this

Format(EstTime, "short time")
0
 
TimCotteeCommented:
Hi PeteZ,

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

Tim Cottee MCSD, MCDBA, CPIM
http://www.timcottee.tk 

Brainbench MVP for Visual Basic
http://www.brainbench.com

Experts-Exchange Advisory Board Member
0
 
CleanupPingCommented:
PeteZ:
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?
0
 
DanRollinsCommented:
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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