helper function to extract the picture date