#1
|
||||
|
||||
Time Stamp to seconds
Hi freinds
Sorry for bothering (my brain is fogged out) how via VBA can I translate a timestamp of a value: 01:03:23 (1 hour, 3 min, 23 seconds) into a total number of seconds. (not from a given date, just the amount of seconds in 1 hour, 3 minutes and 23 seconds) The string is in text format so maybe we will have to change it to integer?? TIA Susan |
#2
|
||||
|
||||
In Excel, the formula would be
="1:03:23"*24*60*60 In VBA there might be easier ways to do it but this appears to work Code:
Dim sTime as string sTime = "1:03:23" Hour(sTime)*3600+Minute(sTime)*60+Second(sTime)
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Eliminate time stamp in Track Changes | Aden | Word | 19 | 07-10-2023 09:02 PM |
Time Stamp Incorrect | ashippen | Outlook | 0 | 06-27-2016 12:04 PM |
Time Stamp for Categories? | mlef | Outlook | 0 | 05-18-2016 09:46 AM |
Date & time stamp problems in Word XP | Scotfan | Word | 3 | 03-09-2016 09:45 AM |
Updating time stamp only when changes have been made and re-saved | ashmo0024 | Word | 1 | 09-05-2014 01:46 PM |