/ Published in: Other
Takes a video timecode (a) in text format "00:00:00:00" and converts it to frames, using the supplied framerate (b). Mainly for use in OpenOffice Calc.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Function TCTOFRAMES(a,b) Dim HrsString as String Dim HrsInt as Integer Dim HrsConvToFrames as Long HrsString = left(a,2) HrsInt = HrsString HrsConvToFrames = HrsInt*60*60*b Dim MinsString as String Dim MinsInt as Integer Dim MinsConvToFrames as Integer MinsString = Mid(a,4,2) MinsInt = MinsString MinsConvToFrames = MinsInt*60*b Dim SecsString as String Dim SecsInt as Integer Dim SecsConvToFrames as Integer SecsString = Mid(a,7,2) SecsInt = SecsString SecsConvToFrames = SecsInt*b Dim FramesString as String Dim FramesInt as Integer FramesString = right(a,2) FramesInt = FramesString TCTOFRAMES = HrsConvToFrames+MinsConvToFrames+SecsConvToFrames+FramesInt End Function