How To Calculate Time
There are several time fields in Collect! that mark
important moments in the life of an account. Examples of
these are debtor worked time, contact created time,
contact done time and transaction created time. Another
example is the Time field in the Contact form, used to
create timed contacts.
Time fields may be used to create conditional expressions
in reports and control files. Time fields may be added or
subtracted to calculate elapsed time. Hours or minutes
can be added to time.
All this is possible with a few requirements kept in mind:
- Time format for calculations is hoursminutesseconds
without spaces or colons.
- Use two places for each value.
- Use the twenty-four hour clock.
Examples:
@varTime = 101545
This is 10:15:45 AM
@varTime = 221545
This is 10:15:45 PM
@co.ct - 300000
This is contact created time minus 3 hours
@(de.wt-co.dt)
This is debtor worked time minus contact done time
Current time is stored in @t
You may add or subtract from this to use in calculations,
using time variables. To declare a Time variable, simply
initialize your variable to a time field.
@varTime = @de.wt
@varFlag = 1 if (@varTime < @t+020000)
One use of this is timezones. For an example of
setting the color of the phone field depending on time
zones please refer to Help topic Timezone Alerts.
Go to the Member Center and download a report
snippet for formatting time using the twelve hour
clock, AM and PM.
Go to the Member Center Add-Ons page.
See Also
- Timezone Alerts
|
Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.
Please click this link to send us your comments: helpinfo@collect.org