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

Re: Appleworks Users



Robert,

You're always good for challenging AppleWorks questions.

I suppose I should thank you, even though they sometimes give me headaches.
<grin>

Anyway, as I suspect you already know, there are several UltraMacros 'dot'
commands that deal with time functions, including one that will convert
minutes back to hours & minutes (i.e. - .str2time).

But, I realize you wish to accomplish this automatically within the
database, and as you discovered, while you can convert hours & minutes to
minutes only with '@TimetoNum', there is no documented (or undocumented)
corresponding '@NumToTime' function.

But, with a formula (or 2, or 3), you can accomplish what you want.

The sample database record shown below allows you to enter your program
start time, the program length (in minutes), and calculates the program end
time.

Also shown below are the database rules/formulas necessary for achieving
this.

I suspect several of the formulas can be combined to eliminate the
'intermediate' categories, but I'm not mentally sharp enough (at the moment)
to do that.

Even if the formulas could not be combined, I would just hide the
intermediate categories from view, assuming you are not bumping up against
the 60 categories/record limit in your database.

Try this stuff out and let us know how it works.

I think you have a neat idea for an AppleWorks database, by the way.

Hugh Hood


------------BEGIN SINGLE RECORD LAYOUT SCREEN---------------

File: TimeTest2       REVIEW/ADD/CHANGE    Escape: Main Menu

Selection: All records


Record 1 of 1  (1 selected)
============================================================
StartTime.H&M:  9:00 AM
Start.Minutes: 540 
Length.Minutes: 45 
End.Minutes: 585   
End.Hours: 9       
EndRemain.Minutes: 45
EndTime.H&M:  9:45 AM



------------------------------------------------------------
/ZIP.1/APPLEWORKS.5                        02/11/10 10:31 am

--------------END SINGLE RECORD LAYOUT SCREEN---------------


------------------BEGIN DATABASE RULES SCREEN---------------

File: TimeTest2
============================================================

Category: StartTime.H&M (Auto-recalc category)
  Format: Justification: Unjustified  Field width:  0
 Numeric: Appropriate  Decimal places:  0
Negatives: As entered
   Rules: None

============================================================

Category: Start.Minutes
  Format: Justification: Unjustified  Field width:  0
 Numeric: Appropriate  Decimal places:  0
Negatives: As entered
   Rules: Formula
          @TimeToNum([StartTime.H&M])

============================================================

Category: Length.Minutes (Auto-recalc category)
  Format: Justification: Unjustified  Field width:  0
 Numeric: Appropriate  Decimal places:  0
Negatives: As entered
   Rules: None


============================================================

Category: End.Minutes
  Format: Justification: Unjustified  Field width:  0
 Numeric: Appropriate  Decimal places:  0
Negatives: As entered
   Rules: Formula
          [Start.Minutes]+[Length.Minutes]

============================================================

Category: End.Hours
  Format: Justification: Unjustified  Field width:  0
 Numeric: Appropriate  Decimal places:  0
Negatives: As entered
   Rules: Formula
          @Int([End.Minutes]/60)

============================================================

Category: EndRemain.Minutes
  Format: Justification: Unjustified  Field width:  0
 Numeric: Appropriate  Decimal places:  0
Negatives: As entered
   Rules: Formula
          [End.Minutes]-([End.Hours]*60)

============================================================

Category: EndTime.H&M
  Format: Justification: Unjustified  Field width:  0
 Numeric: Appropriate  Decimal places:  0  Negatives: As entered
   Rules: Formula
          @Join((@Right(@Join("00",[End.Hours]),2)),(@Right(@Join
          Remain.Minutes]),2)))

============================================================

------------------END DATABASE RULES SCREEN-----------------



in article boucher1-602BC0.08164308022010@news.giganews.com, Robert Boucher
at boucher1@alumni.texas.net wrote on 2/8/10 8:16 AM:

> I am trying to simplify my TV scheduling program. I can do a Time to
> Number function on the Start time and add the program length. I haven't
> found a function that will allow me to convert the resulting number back
> to End time. Is there a function I am overlooking, or is there a work
> around?
> 
> Any help would be appreciated.