in reply to String Operation

Alternatively, POSIX's strftime() can be quite useful for this sort of thing:
$activity_date = strftime("%d%m%Y", localtime(time)); for example.