PySpark code
>>> df.writeTo("tesdf_writeTo").partitionedBy(days("datetime")).create()

teradatamlspk code
>>> df.writeTo("tesdf_writeTo").options(primary_index="column name or tuple of column names(Required Argument)").partitionedBy(days('datetime')).create()