Removed redundant getdate function