Remove Time from datetime in Python (Example) | Display & Print Only Date | Apply date() Function

preview_player
Показать описание
Python code of this video:

import datetime # Import datetime module

print(my_datetime) # Print example datetime

print(my_date) # Print only date

Follow me on Social Media:

Рекомендации по теме
Комментарии
Автор

What do I do if i have a column with the date and time but I only want to keep the date. How would I remove the time from that column?

Dulcekathy
Автор

You've performed from A to B to C. Is it possible to do just one step from A to C? My issue is when I plot my df, the time stamp goes onto the plot (even though it's NOT showing on the df) and I've been searching for days on how to get rid of the time stamp.

kevennguyen
Автор

how to get daytime data only (6:00 to 18:00 hours) from datetime data (24 hours data)

s