Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2021, 11:53 PM
RRB's Avatar
RRB RRB is offline Time Stamp to seconds Windows 8 Time Stamp to seconds Office 2013
Susan Flamingo
Time Stamp to seconds
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 249
RRB is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 06-15-2021, 03:07 AM
Guessed's Avatar
Guessed Guessed is offline Time Stamp to seconds Windows 10 Time Stamp to seconds Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Stamp to seconds 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
Time Stamp to seconds Date & time stamp problems in Word XP Scotfan Word 3 03-09-2016 09:45 AM
Time Stamp to seconds Updating time stamp only when changes have been made and re-saved ashmo0024 Word 1 09-05-2014 01:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft