I used the date$ to right a little qb prog.
If I type date at the command prompt
I shows something like this "SAT 09-09-2000"
I formatted the out put to look like "September 9th, 2000"
What I need to know is how to get the day e.g. "SAT"
so I can format it to say "Saturday" in the middle of
the screen.
I don't know how you did it, but I can't get the date$ command in Qbasic output a date with SAT or MON before it. Anyways, if u want just to extract the thirst three letters and make out of SUN sunday, in the middle of the screen... that's not so hard; here's the code. You have to fill in the x and the y for the locate statement yourself, caus' it depends on the screen resolution your using.
As I told you before, I don't know how you did the day-stuff. But you'll have to store this as a string, for example; mystring$. So you got this string, e.g. "SAT 09-09-2000" ok?. Than do this:
locate x,y 'middle of the screen
if right$(mystring$,3) = "SUN" then print "Sunday"
if right$(mystring$,3) = "MON" then print "Monday"
etcetera etcetera etcetera
Or, if you wanna safe space:
locate x,y
day$ = right$(mystring$,3)
if day$ = "SUN" then print "SUNDAY"
if day$ = "MON" then print "MONDAY"
etcetera etcetera etcetera
I don't know if this is what you're looking for, but anyways... damn... did i really talked this much?!
At my last job, before we went to vb, we had a little (actually, it was kinda big) function that would return the day of week by retrieving a numeric value.
If you would like this, I can have a friend send the code and I can post it for you. But you are probably smarter going to vb anyway.
When you have the date the you can get the day with the so called "Week-Day formula" by Gauss.
I will have to find my old maths book to get the formula, so write back if you're still interested.