ShriRam Changed status to publish August 21, 2023
import datetime
x = datetime.datetime.now()
print(x)
x = datetime.datetime(2020,5,17)
print(x)
x = datetime.datetime(2020, 5, 17,1,12,15,23456)
print(x)
x = datetime.datetime.now()
print(x.strftime(“%B”))
print(x.strftime(“%a”))
print(x.strftime(“%A”))
print(x.strftime(“%w”))
print(x.strftime(“%d”))
print(x.strftime(“%b”))
print(x.strftime(“%m”))
print(x.strftime(“%y”))
print(x.strftime(“%Y”))
print(x.strftime(“%H”))
print(x.strftime(“%I”))
print(x.strftime(“%p”))
print(x.strftime(“%M”))
print(x.strftime(“%S”))
print(x.strftime(“%f”))
print(x.strftime(“%j”))
print(x.strftime(“%U”))
print(x.strftime(“%W”))
print(x.strftime(“%c”))
print(x.strftime(“%x”))
print(x.strftime(“%X”))
ShriRam Changed status to publish August 21, 2023