Results 1 to 4 of 4

Thread: [RESOLVED] Calculation with dates...situation 2.

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    36

    Resolved [RESOLVED] Calculation with dates...situation 2.

    Hi Guys, you already gave me some good help and I'm very glad for it. Now I have another situation for my application, you guys helped me separating values, but I tried everything copied the other code...but I have serious begginer problem

    Pls check the image and if possible the code, mny tks
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by hpunaro; Feb 9th, 2007 at 04:59 PM.

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    36

    Re: Calculation with dates...situation 2.

    I updated the topic, could you check and if possible help me. Thank you!

  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Calculation with dates...situation 2.

    Does this help?

    VB Code:
    1. Private Sub Command1_Click()
    2. a = "00:40"
    3. b = "00:25"
    4.  
    5. Hr = Val(Left(a, 2)) - Val(Left(b, 2))
    6. Min = Val(Right(a, 2)) - Val(Right(b, 2))
    7.  
    8. Diff = Format(Hr, "00") & ":" & Format(Min, "00")
    9.  
    10. 'I have used a messagebox to display result
    11. 'you can store it in a variable...
    12. MsgBox Diff
    13.  
    14. End Sub
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    36

    Resolved Re: Calculation with dates...situation 2.

    Ok ! I did a very crazy thing cause I'm working with hours and values could not be less than 0...so far it worked.

    Guy thank you a lot helping me!

    Now I have to create an array hahaaha
    Last edited by hpunaro; Feb 9th, 2007 at 05:23 PM.

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