Don't fully understand the second one of converting string to date