Those requests to google's API are async calls - so the next piece of code is executed while that function is still processing. The correct way to do this is to use callbacks rather than globals:
function getLiveDate(fileId, callback) {
...
request.execute(function(resp) {
callback(resp);
});
}
And call this
getLiveDate(lastFileId, function(resp) {
console.log(resp); //your data
});