cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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
Contributor III

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group