0

I have a table with a date column as string data type when i try to retrive data by converting it to date data type getting Null values instead of getting date value

Example: select cast(ColumnName as date) from TableName

existed data before doing cast is '2022/08/22' after applying cast got Null values

SBC
  • 1

1 Answers1

0

New to Databricks and a coworker just had this come up. Make sure the 'yyyy/MM/dd' is whatever format your date currently is. It appears to tell databricks what is what. We initially tried the format we wanted the date in and that returned all nulls.

LL15
  • 1