Is it possible to add a snippet of code to allow the Anki browser to show seconds in card creation date hours? Natively Anki only shows hours and minutes.
I’m posting the complete code here of the addon that I want to modify and the code is in the addon’s __ init __.py.
I tried through ChatGPT, but Chat GPT couldn’t do it.
from aqt import gui_hooks
from aqt.qt import QAction
from aqt import mw
from . import set_added_date
def setupAction(browser):
actionSetAddedDate = QAction("Set Added Date...", browser)
actionSetAddedDate.triggered.connect(lambda: set_added_date.setAddedDate(browser))
browser.form.menu_Cards.insertAction(browser.form.menu_Cards.actions()[2], actionSetAddedDate)
gui_hooks.browser_menus_did_init.append(setupAction)
So instead of me adding a snippet of code to a part of the add-on I gave above, should I just create a new add-on with the code you provided?
Part of the code I indicated above is from an add-on that changes the card creation date. I thought it would be convenient to just add this function of showing seconds to this add-on, as it is a function that would make it easier for me to use and I miss this function in this add-on.
Just a note: does anki store milliseconds as well? Did you tell me if it would be possible to add within the code to show the milliseconds as well?
In the add-on that changes the card’s creation date, when the change is made in bulk (multiple cards), the creator said that millisecond difference is added to each card.
I tried “.%f” after “%S” in (“%Y-%m-%d @ %H:%M:%S”), but it showed “H:M:S.000000” in the card creation date column.