Results 1 to 2 of 2

Thread: Making a day counting program

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2000
    Location
    Seattle, WA, USA
    Posts
    46

    Question

    Hi,

    I am trying to make a program that will count the number of days since a set date for example today is the 24 so I would like to make a program that would report when a run it on Thursaday that this is day 1, friday is day 2, and so on... It would be cool to also report how man months weeks, days it has been, along with reporting total days.

    Here is my code so far (needs work I know)

    Code:
    Private Sub Form_Load()
    Dim sDate
    Dim sCount
    Dim dCount
    sCount = 0
    sDate = #5/23/00#
    Dim tDate
    tDate = Date
    Label1.Caption = tDate
    If tDate > sDate Then dCount = sCount + 1
    Label2.Caption = dCount
    End Sub
    Thanks,

    Kevin

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325
    Look at the DateDiff function.
    -Shickadance

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width