hello people!

i need some help in making a date in date out in my program and it really gives me a "real-time" headache. the problem is, it is possible to put some warning if for example the "client" has already overstayed it accomodations. and i really have no idea on how
to do it.
thanks to all that will help. ^_^

here is what i'ved got so far

private sub cmdOK_Click()

lblDIn.caption = now
lblDOut.caption = now + Val(text1.text)
end sub

ThugLine ^_^

Recommended Answers

All 4 Replies

There are lot of DATE functions in VB to use. Try any of them as you need in the program. . DateAdd, DateDiff etc.

its not clear to me

Your question is not clear. I don't understand your example too. Sorry for that.
Thanks

You will have to use the DateDiff function to subtract the In date from the Out date. If the Out Date is a negative, your client is overstaying.

There are tons of sample code on the above, google DateDiff in vb6 and a sample closest to your request.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.