To remove seconds in pyspark sql in notebook:
SELECT
date_trunc('day', current_timestamp) as DateTimeWithZeroHoursMinutes
date_trunc('minute', current_timestamp) as DateTimeWithZeroSeconds,
date_trunc('second', current_timestamp) as DateTimeWithZeroMilliseconds,
date_format(current_timestamp, "yyyy-MM-dd HH:mm") as DateWithNoSeconds
No comments:
Post a Comment