VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



RoundedTime

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)

Rate RoundedTime

Download RoundedTime

Download RoundedTime (6 KB)

RoundedTime Comments

No comments have been posted about RoundedTime. Why not be the first to post a comment about RoundedTime.

Post your comment

Subject:
Message:
0/1000 characters