TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Eakummer{at}swbell.Net
date: 2004-07-18 17:19:00
subject: datediff problem

Can anyone help me with this code?  It is a countdown timer for a future
date but the minutes do not change until there is 30 seconds left, not 0 sec
as I expected.  Thanks.

Dim targetdatetime As String
Dim secondsleft As Double

Dim numdays As Integer
Dim numhours As Integer
Dim nummins As Integer
Dim numsecs As Integer


Private Sub Form_Load()
  targetdatetime = "08/21/2004  10:00:00 am"
Private Sub Timer1_Timer()
    secondsleft = DateDiff("s", Now, targetdatetime)

    numdays = secondsleft / 86400
    secondsleft = secondsleft Mod 86400

    numhours = secondsleft / 3600
    secondsleft = secondsleft Mod 3600

    nummins = secondsleft / 60
    secondsleft = secondsleft Mod 60

    numsecs = secondsleft
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 7/18/04 5:19:35 PM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.