[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Day of the Week



There are a few UltraMacros commands such as the dot command .weekday
-- that can extract the day of the week from a date. However, I think
that  may be more work than you probably want to do.

X=.weekday DD,MM,YYYY:   // Get weekday into Variable X; 1-7
                                                    // 0,0,0 = today's
date

After grabbing the weekday number in variable X, you would use .choose
(macro) or @choose (data base formula) to convert it to the weekday
name.

An improved weekday command which came along later is .DoFW$, which
pulls the weekday name directly from a string in Date2 (mm/dd/yyyy)
format:

Cell:          // Capture the date in current category, row (must be
date2)
$1=.DoFW$ $0:      // Returns "Sun","Mon", etc.

Not sure about the exact syntax, as this is untested by me, only taken
from my notes.  .DoFW$ is not one of the basic UltraMacros dot
commands; it was released later, probably in TEXAS II, but I don't
remember exactly.

We probably discussed all this in the Apple II Mail Group at some
point. If no one has a simpler answer by tomorrow, I will search those
disks to see if it was discussed.

The bottom line is I don't think you can do it with a straight data
base entry or simple formula; it would probably have to involve one of
the above macro commands to pull the weekday number out of the date
string.

{BTW, to others (not Robert) there is no "pull-down menu" in the
"real" AppleWorks.}

Beverly Cadieux
TEXAS II an International Newsletter for users of AppleWorks(R) 5.1