BusinessObjects Board

Formula Help - Group by week

I have the following formula to group by week starting on Friday. Currently it is set to convert the date “totext”. How can I change the formula to leave as a date rather than text? This way I can run multiple years and the week groups will be in chronological order. TIA

local datetimevar start;
local datetimevar end;
start:= {unithist.onduty}-weekday({unithist.onduty},6)+1;
End:=start+6;
totext(start,“MM/dd/yy”) & " - " & totext(end, “MM/dd/yy”)


ncgov (BOB member since 2018-10-17)