Vince
Try the below ex:
You just need to force Crystal Reports to evaluate your function, so in your F2 function, add WhilePrintingRecords;
to the first line, like this:
WhilePrintingRecords; datetimevar endts; endts;
This should force the report to evaluate the formula as it prints each grouping.
Thank,
DJ