by Brian Battles WS1O (15 Submissions)
Category: Math/Dates
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
Generate string containing current time rounded to the nearest N minutes (eg, set it for 5-minute intervals and 3:15 to 3:20 PM are displayed as 15:15). Could be used to fire events every N minutes, or whatever.
Inputs
Current time (from Timer control, or VB Now() function, etc)
Code Returns
String formatted as HH:MM (eg, 13:20)
Download RoundedTime (6 KB)