DateTimeVar startdate := {table.datefield1};
DateTimeVar enddate := {table.datefield2};
Numbervar weekdays:=
Datediff("d", startdate, enddate) -
Datediff("ww", startdate, enddate, crSaturday)-
Datediff("ww", startdate, enddate, crSunday);
weekdays * 86400
This will count the total difference in days between your two dates and then deduct all Saturdays and Sundays.
Ryan.
EDIT: Didn't realize you wanted seconds.... the above has been amended to work assuming your enddate and startdate don't contain a time element ie 01-Jan-2012 00:00:00, a more complex formula will be needed if your end/start dates contain a time.
Ryan.