README.md

December 4, 2022 ยท View on GitHub

A1 Sec2Min

Description

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.

More Info

Submitted On
Byroy
LevelBeginner
User Rating3.9 (27 globes from 7 users)
CompatibilityVB 4.0 (32-bit), VB 5.0, VB 6.0
CategoryMath/ Dates
WorldVisual Basic
Archive File

Source Code

Dim lSecs As Long
Dim sMin As String
lSecs = 120
sMin = Format(Fix(lSecs / 60), "#0") & _
  ":" & Format(lSecs Mod 60, "00")
MsgBox sMin