Hi I am trying to change datatype of DOB column from stringtype to DateType but getting issue
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2024 06:32 AM - edited 06-30-2024 06:33 AM
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
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 01:24 AM
It's because the format you're using it wrong. Use `'M/d/yyyy'` instead.

