Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to split a time notation in (only) hours and minutes.

Status
Not open for further replies.

leifoet

Technical User
Jan 31, 2016
203
BE
How can I convert / split (in ASP Classic) this time format 19:30:00 (from my Access-database-field 'Time' - field-notation : date/time) in the following more readable format 19h30 ?
Thanks for tips.

 
Off the top off my head useing split()

timearray = split(timestring,':')
friendlytime = timearray(0) & "h" & timearray(1) & "m" & timearray(2) & "s"


Not tested and no error checking done


Or use the date and time functions

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top