User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 427,376 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,989 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 323 | Replies: 1
Reply
Join Date: Jun 2007
Location: india /bangalore
Posts: 18
Reputation: ITech is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ITech's Avatar
ITech ITech is offline Offline
Newbie Poster

problem with adding duration to time

  #1  
Apr 3rd, 2008
hello

i am doing a project in vb n ms access, i have an issue..its simple i think but i dont no..
in my form i have intime text box which has the computer time,and there is a duration textbox where i have to type in a number..and one more text box is there timeout,,which's value shud be intime + duration, duration is entered in minutes

eg: suppose
intime = 3.00
duration in mins = 90
then out time shud be = 4.30
can any one tell me how to do for dates its easy n i know we have to use dateadd funcion...can anyone tell me for time.is there any function or so ...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Posts: 712
Reputation: QVeen72 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 97
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Master Poster

Re: problem with adding duration to time

  #2  
Apr 3rd, 2008
Hi,

Check this code:

  1. Dim InDate As Date
  2. Dim NewDate As Date
  3. InDate = Format(txtIn, "hh:mm:ss")
  4. NewDate = DateAdd("n", Val(txtDur), InDate)
  5. txtOutTime = Format(NewDate, "hh:mm")

Regards
Veena
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 3:58 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC