home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch20 / seditor / year2000.scr < prev   
Encoding:
Text File  |  1998-07-02  |  592 b   |  19 lines

  1. "Sub Main()
  2.     Show ""YEAR 2000 CALCULATIONS""
  3.     Show Days2000 & "" days left for the year 2000""
  4.     Show FormatNumber(Seconds2000, 0, False, False, True) & "" seconds left until the year 2000""
  5.     Show FormatNumber(Minutes2000, 0, False, False, True) & "" minutes left until the year 2000""
  6. End Sub
  7.  
  8. Function Days2000()
  9.     Days2000 = #1/1/2000# - Date()  
  10. End Function
  11.  
  12. Function Seconds2000()
  13.     Seconds2000 = (#1/1/2000 0:0:00 AM# - Date()) * (24*60*60)
  14. End Function
  15.  
  16. Function Minutes2000()
  17.     Minutes2000 = (#1/1/2000 0:0:00 AM# - Date()) * (24*60)
  18. End Function"
  19.