Converting an Integer to a Time

I have a time in minutes as an Integer and want to covert it into a time that will display to a grid hours and minutes.
Example:

Input :      Time in minutes = 745
Output: Time in hours and minutes = 12:25

I also want to compare this time with the current time now and if the time now is greater that the time listed then I want to set a Boolean flag as true.

Thank you for your help and I look forward to your reply
Richard
StokeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

caraf_gCommented:
'Q1:
Dim t As Integer
t = 745

Dim dblD As Double
dblD = t
dblD = t / 60 / 24

Dim datD As Date
datD = dblD
MsgBox Format(datD, "hh:nn")

'Q2:

Dim datB As Date
datB = Now
datB = datB - Int(datB)

If datB > datD Then
    'It's after 12:25
End If

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StokeAuthor Commented:
Very Well Done.  Exactly what I needed.
Thank you Caraf_g
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.