You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from PyQt6.QtCore import QDate, QTime, QDateTime, Qt
|
|
|
|
# 获取当前日期
|
|
now=QDate.currentDate()
|
|
print(now.toString(Qt.DateFormat.ISODate))
|
|
print(now.toString(Qt.DateFormat.RFC2822Date))
|
|
print(now)
|
|
|
|
# 获取当前时间
|
|
datetime=QTime.currentTime()
|
|
print(datetime.toString()) |