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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing a String into Time Format

Status
Not open for further replies.

ryan101

Programmer
Jul 11, 2001
13
US
I've got strings of numbers like:
a = 4
b = 416
c = 723
d = 1534

I want to be able to convert these numbers into time format so that
a = 12:04am
b = 4:16am
c = 7:23am
d = 3:34pm

Anyone know of a quick and painless method?
 
a = CDate(TimeSerial(int(a/100), a mod 100, 0))
b = CDate(TimeSerial(int(b/100), b mod 100, 0))
...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top