Results 1 to 12 of 12

Thread: HH:mm to minutes problem.

Threaded View

  1. #1

    Thread Starter
    New Member mrfikri's Avatar
    Join Date
    Nov 2008
    Location
    Malaysia
    Posts
    5

    Resolved HH:mm to minutes problem.

    Hi,

    I am working on an assignment given by my lecturer. She wanted us to develope a 'Parking System'. I've no problem with the system. The only problem I have is to convert HH:mm to minutes.

    You can look at my attachment. That's how my system looks like. I have coded it. I need you to help me, to convert HH:mm to minutes because I need it in minutes to do the bill's calculation.

    This is my code:

    Code:
    Private Sub Command1_Click()
    Text1.Text = Format(Time$, "HH:mm")
    timeIn = Text1.Text
    Command1.Enabled = False
    Command2.Enabled = True
    End Sub
    ------------------------------------------------
    Private Sub Command2_Click()
    Text2.Text = Format(Time$, "HH:mm")
    
    totalTime = TimeValue(Text2.Text) - TimeValue(Text1.Text)
    
    Picture1.Cls
    Picture1.Print Format(totalTime, "HH:mm")
    
    Command2.Enabled = False
    Command1.Enabled = True
    End Sub
    ------------------------------------------------
    Private Sub Form_Load()
    Command2.Enabled = False
    End Sub
    On the same time, I also need someone to explain to me, what is actually 'Time$' written in the code for? I got the code to set HH:mm from a few websites but I have no idea the use of 'Time$'. I hope, you don't mind to help me on this. I'm waiting for responses.
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width