Added function to split date string to vairables.