cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi I am trying to change datatype of DOB column from stringtype to DateType but getting issue

parakh17
New Contributor

Hi I am trying to change datatype of DOB column from String type to DateType but getting issue
"SparkUpgradeException: [] You may get a different result due to the upgrading to Spark >= 3.0: Caused by: DateTimeParseException: Text '7/8/1972' could not be parsed at index 0"

I have attached screenshots for your reference. Can someone help. I know this is a silly doubt but help is really appreciated ! Thanks in advance


Screenshot 2024-06-30 at 6.50.42 PM.pngScreenshot 2024-06-30 at 6.50.57 PM.pngScreenshot 2024-06-30 at 6.51.01 PM.png

1 REPLY 1

Witold
Honored Contributor

It's because the format you're using it wrong. Use `'M/d/yyyy'` instead.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now