Answers for "finding current date in python"

32

python current date

from datetime import date

today = date.today()
print("Today's date:", today)
Posted by: Guest on April-15-2020
3

find todays date in python

from datetime import datetime

# Current date time in local system
print(datetime.now())
print(datetime.date(datetime.now())) ##For Date
Posted by: Guest on July-29-2020
0

python print datetime

import datetime
print("Now:", datetime.datetime.now())
Posted by: Guest on August-23-2020
0

how to show today time in python

from datetime import datetime
import pytz

tz_NY = pytz.timezone('America/New_York') 
datetime_NY = datetime.now(tz_NY)
print("NY time:", datetime_NY.strftime("%H:%M:%S"))

tz_London = pytz.timezone('Europe/London')
datetime_London = datetime.now(tz_London)
print("London time:", datetime_London.strftime("%H:%M:%S"))
Posted by: Guest on May-11-2020

Code answers related to "finding current date in python"

Python Answers by Framework

Browse Popular Code Answers by Language