Date$ ???

 BBS: Inland Empire Archive
Date: 12-12-92 (13:10)             Number: 288
From: RICK PEDLEY                  Refer#: NONE
  To: BOB OEHRLE                    Recvd: NO  
Subj: Date$   ???                    Conf: (2) Quik_Bas
 On 12-10-92 Bob Oehrle wrote to All...

 BO> While in Dos if I call for the date I get Wed-12-12-92. If I print
 BO> date$ in qb4.5 I get 12-12-92.  Is there away that I can get the days
 BO> to print ?? It seems that if I use Mid$ function I can't extract Wed .
 BO> I'm trying to write a calendar routine that will alert me at start up
 BO> every wednesday to preform a particular job.

'Day of week

INPUT "MM,DD,YYYY: ", M, D, Y     'or extract from DATE$ (Add 1900 to YY)
X = -INT((1 / (M + 1) + .7))
Z& = INT((M + 1 - 12 * X) * 30.6001) + INT((Y + X) * 365.25) + D
X = Z& - 7 * (Z& \ 7)
DayOfWeek$ = MID$(Days$, X * 3 + 1, 3)
PRINT DayOfWeek$

... OFFLINE 1.40

--- Maximus 2.01wb
 * Origin: The BULLpen BBS * Intel 14.4EX (613)549-5168 (1:249/140)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET