Advertisement
5_2007-2008 Math/ Dates #174325

A1 Sec2Min

Convert seconds to minutes with just one line of code. I was encouraged to submit this after seeing where some guy had submitted 50 or so lines of code to do the same thing. This can be expanded to return hours, just follow the logic.

AI

KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Quellcode
original-source
Dim lSecs As Long
Dim sMin As String
  
lSecs = 120
sMin = Format(Fix(lSecs / 60), "#0") & _
  ":" & Format(lSecs Mod 60, "00")
MsgBox sMin
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine