Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  XML (Extensible Markup Language)

formatTime Method


Formats the supplied time using the specified formatting options.

Syntax

strValue = oXTLRuntime.formatTime(varTime, bstrFormat, varDestLocale)

Parameters

varTime
Variant. Time value that is to be formatted.
bstrFormat
String. Specified formatting to be applied to the time. The following codes are supported:
h
Hours as 0-23
hh
Hours as 00-23
m
Minutes as 0-59
mm
Minutes as 00-59
s
Seconds as 0-59
ss
Seconds as 00-59
AM/PM
Insert AM or PM, display hours as 12 hour clock
am/pm
Insert am or pm, display hours as 12 hour clock
A/P
Insert A or P, display hours as 12 hour clock
a/p
Insert a or p, display hours as 12 hour clock
[h]:mm
Elapsed time in hours; for example, 25.02
[mm]:ss
Elapsed time in minutes; for example, 63:46
[ss]
Elapsed time in seconds
ss.00
Fractions of a second
varDestLocale
Variant. Locale to use in determining the correct sequence to be used in the time.

Returns

String. Returns the string containing the time in the requested format.

Applies To


Does this content meet your programming needs? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site