Python Forum
Help needed in finding a library for this project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help needed in finding a library for this project
#2
Happy Christmas!

You need datetime! Look up the docs for all the %letter parameters.

from datetime import datetime

now = datetime.now()
print(now.strftime('Hour (00-11)          : %I'))
print(now.strftime('AM/PM                 : %p'))
print(now.strftime('%I%p'))
hour = now.strftime('%I%p')
if hour == '05PM':
    do something
PythonEnthusiast1729 likes this post
Reply


Messages In This Thread
RE: Help needed in finding a library for this project - by Pedroski55 - Dec-25-2023, 08:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Music Help with: Audiobook Library/Copier Project eleven43 0 521 Sep-14-2023, 04:17 PM
Last Post: eleven43
  Problem with importing python-telegram library into the project gandonio 1 1,688 Nov-01-2022, 02:19 AM
Last Post: deanhystad
  Join the Python Standard Library to my project sylas 1 2,246 May-16-2018, 05:59 AM
Last Post: buran
  Library Program Prison Project lewashby 9 6,409 Jul-13-2017, 05:25 AM
Last Post: Larz60+
  PyInstaller, how to create library folder instead of library.zip file ? harun2525 2 4,928 May-06-2017, 11:29 AM
Last Post: harun2525

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020