Write datetime.datetime.date().
Returns the datetime.date
object that stores the same year, month, and day as datetime.datetime
.
Usually
mydatetime = datetime.datetime.now()
mydate = mydatetime.date()
#If you shorten it,
mydate = datetime.datetime.now().date()
However, if you only want to find out today's date, you can use the datetime
object without it
datetime.date.today()
I don't mind just using it.
623 Uncaught (inpromise) Error on Electron: An object could not be cloned
578 Understanding How to Configure Google API Key
922 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.