Date Field as Title Field

Hi Steve,
First of all, please excuse me for asking lots of questions at the moment. I suppose that I am still getting to grips with Xataface having been using it for less than a month. Could I take this opportunity however to say that so far I am highly impressed with it all. Anyway now to my latest problem.
I've got a table in which the primary key is a date field and I want to use it as the title field. The simple approach of putting title=1 in fields.ini works fine. To get a more complex title, I've tried putting something like this in the delegate class for the table:-
function getTitle(&$record)
{
return 'Week commencing '.$record->val('date');
}
The word 'Array' is displayed instead of the actual date. Presumably I'm doing something wrong.
Thanks,
Andrew.
First of all, please excuse me for asking lots of questions at the moment. I suppose that I am still getting to grips with Xataface having been using it for less than a month. Could I take this opportunity however to say that so far I am highly impressed with it all. Anyway now to my latest problem.
I've got a table in which the primary key is a date field and I want to use it as the title field. The simple approach of putting title=1 in fields.ini works fine. To get a more complex title, I've tried putting something like this in the delegate class for the table:-
function getTitle(&$record)
{
return 'Week commencing '.$record->val('date');
}
The word 'Array' is displayed instead of the actual date. Presumably I'm doing something wrong.
Thanks,
Andrew.