What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » VB Help (DateDiff)

VB Help (DateDiff)
Author: Message:
spokes
Full Member
***

Avatar
I <3 Rollerblading

Posts: 423
Reputation: 10
33 / Male / Flag
Joined: May 2004
O.P. VB Help (DateDiff)
ok, im making a program, and its going to count how many minutes are between 2 times, the times are from the same day btw, and i don't know how to do it.

i know i need to use datediff



[do not need to read to answer question]
Anyway, this program i'm making is for my coursework for ict, i have to choose a company and show ways they can improve by using computers.
so i've picked my local skatepark, who, when you enter it write your name down on paper, and put it in a shelf/box with a time on the front (I.E i got there at 4PM and ask for 2 hours, so they put my name in the 6PM box, and then at 6PM they call my name out)
well, i'm making a program that does it all on a pc, and gives notification when it's time for them to leave.
i'm trying to add a feature so they can see how many Hours and minutes they have left, but i can't figure it out
[/do not need to read to answer question]

Anybody?

Edit : I have

code:
Label2(3) = DateDiff("h", Time, strLeave)

but it's returning 1 hour even though it should be 1 hour 30 mins

This post was edited on 06-13-2005 at 04:55 PM by spokes.

[Image: sig15ws.png]
06-13-2005 04:54 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: VB Help (DateDiff)
you should be able to do
code:
label2(3) = datediff("h",time,strleave) & " hours " & datediff("m",time,strleave) & " minutes"

Something like that
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
06-13-2005 05:00 PM
Profile E-Mail PM Web Find Quote Report
spokes
Full Member
***

Avatar
I <3 Rollerblading

Posts: 423
Reputation: 10
33 / Male / Flag
Joined: May 2004
O.P. RE: VB Help (DateDiff)
Doesn't work, if they got 59 mins left it still says 1 hour 0 mins

[Image: sig15ws.png]
06-13-2005 05:04 PM
Profile E-Mail PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: VB Help (DateDiff)
weird worked when i just tried it, are you sure you got the two times correct?
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
06-13-2005 05:08 PM
Profile E-Mail PM Web Find Quote Report
spokes
Full Member
***

Avatar
I <3 Rollerblading

Posts: 423
Reputation: 10
33 / Male / Flag
Joined: May 2004
O.P. RE: VB Help (DateDiff)
might it be because time is (xx:xx:xx) and strLeave is only (xx:xx)  ??

edit : no one has replied in 3 hours :|

This post was edited on 06-13-2005 at 08:05 PM by spokes.

[Image: sig15ws.png]
06-13-2005 05:10 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On