from pyspark.sql.functions import col
df = sc.parallelize([('2015-07-02T11:22:21.050Z',), (
    '2016-03-20T21:00:00.000Z',)]).toDF(('d_str',))
df_casted = df.select('*', col('d_str').cast('date').alias('dt'), col(
    'd_str').cast('timestamp').alias('ts'))
PySpark: filtering a DataFrame by date field in range where date is string