[Python] How to get min, seconds and milliseconds from datetime.now() in python?

Discussão em 'Python' iniciado por Stack, Abril 28, 2025.

  1. Stack

    Stack Membro Participativo

    >>> a = str(datetime.now())
    >>> a
    '2012-03-22 11:16:11.343000'


    I need to get a string like that: '16:11.34'.

    Should be as compact as possible.

    Or should I use time() instead? How do I get it?

    Continue reading...

Compartilhe esta Página