1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] python strftime("%-d") generate Invalid format string [duplicate]

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

  1. Stack

    Stack Membro Participativo

    I am trying to execute this code in VS code, w10 with python 3.8.

    from datetime import date

    date(2022,10,5).strftime("%-d")


    and generate: ValueError: Invalid format string

    The same code in Colab works perfectly, and the output is 5. How do i solve this problem?

    Continue reading...

Compartilhe esta Página