Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to subtract time?

Status
Not open for further replies.

vinzpom

Programmer
Joined
Oct 15, 2002
Messages
11
Location
PH
how to subtract 75 sec from 12:01 pm.?
please help. i really dont know what to do
 
NewTime=Dateadd("s",-75,#12:01#)
You can use variables for the numbers.Eg this subracts 75 sec from the time of day

dim a as integer
a=-75
Time=Dateadd("s",a,Time())
 
ok, ill try it immediately sir
 
would datediff work as well?
thanks
 

DateDiff is the difference between two dates. DateAdd is one date added or subtracted from by a given number based upon the parameter (seconds, minutes, hours...).

Good Luck

 
thanks for clearing up things vb5prgrmr.
one more thing..

how do i delete my old threads on this site?
 

That you would have to take up with one of the admins of this site....

Good Luck

 
thank you vb5prgrmr.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top