Initialise date beforehand so catch block has access to it