If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Time difference

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-04, 14:27
cs_phillips cs_phillips is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
Time difference

Hi,
how do i calculate difference between times in vb?
Reply With Quote
  #2 (permalink)  
Old 03-18-04, 14:58
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
If you are talking VB6 or earlier, subtract the smaller (start) time from the larger (end) time to get the difference (elapsed).

-PatP
Reply With Quote
  #3 (permalink)  
Old 03-18-04, 16:03
cs_phillips cs_phillips is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
Quote:
Originally posted by Pat Phelan
If you are talking VB6 or earlier, subtract the smaller (start) time from the larger (end) time to get the difference (elapsed).

-PatP
Could we use any inbuilt function like DateDiff to calculate time difference in VB6?
Reply With Quote
  #4 (permalink)  
Old 03-18-04, 22:54
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
I don't know of any VB 6.0 function that is analagous to DateDiff() in MS-SQL. If youi look at how date/time values are stored in MSDN, you can see that simple subtraction works nicely.

-PatP
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On