[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW 5.1 Question
On Aug 6, 7:52 am, Robert Boucher <bouch...@alumni.texas.net> wrote:
> In article <C69FC1CB.3099%hughh...@earthlink.net>,
> Hugh Hood <hughh...@earthlink.net> wrote:
>
>
> > AppleWorks 5.1 eats this stuff up. Not only can you do this with a dot
> > command macro, you can do it in the spreadsheet using just the @mod and
> > @choose commands.
>
> > AppleWorks 5.1 begins its internal numerical date clock on January 1, 1904,
> > with a designation of '0'. This day in history happened to be a Friday.
>
> > Today is August 5, 2009, a Wednesday, which AppleWorks internally designates
> > as the number '38568'.
>
> > So, just put this formula in a spreadsheet cell to give you the named day:
>
> > @CHOOSE(@MOD(A1,7)+1,"Fri","Sat","Sun","Mon","Tue","Wed","Thu")
>
> > 'A1' is a reference to your date cell. Normally you'll have this formatted
> > in your preferred date setting, rather than as just the internal numerical
> > designation.
>
> > This should work until weeks are something other than 7 days long.
>
> > Hugh...
>
> What about a database?
Assume you have record field named 'Date', then use the following
formula in another field:
@Choose(@DateToJul([Date])-@Int(@DateToJul([Date])/7)
*7)+1,"Fri","Sat","Sun","Mon","Tue","Wed","Thu")
The spreadsheet was easier because of @Mod function, but the database
can calculate it. Not sure it works for dates before 1.1.1904 because
the mod formula may not work with negative numbers, but could be
adjusted.
>
>
> > in article boucher1-A4F67D.07404804082...@news-wc.giganews.com, Robert
> > Boucher at bouch...@alumni.texas.net wrote on 8/4/09 7:40 AM:
>
> > > Is there a way, formula wise, to get a named day from a date in
> > > Appleworks 5.1, i.e., Aug 4, 2009 is Tue?