You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Python 3.X installed on Windows 10. Just started learning and made it to the site looking at date representation. I got an error using the format placeholders. Attempting to use the format string '%B %-d, %-I:%M' netted me:
ValueError: Invalid format string
I figured I did something wrong but after looking at StackOverflow turns out I could have used # instead of -.
I do not know the specifics of why this is not working but I thought it would be worth mentioning somewhere that perhaps:
Note: If you using windows and encounter ValueError: Invalid format string when trying to remove leading 0's try using the ampersand in place of the hypen e.g '%B %#d, %#I:%M'
I see that string (platform specific) on the page and a link to the documentation but it was not obvious on that page what I had to do either :/
The text was updated successfully, but these errors were encountered:
This needs to be clearer on the page. I didn't realise I had to use a # for Windows because I missed that (Platform Specific) had its own explanation at the bottom of the page.
I have Python 3.X installed on Windows 10. Just started learning and made it to the site looking at date representation. I got an error using the format placeholders. Attempting to use the format string '%B %-d, %-I:%M' netted me:
I figured I did something wrong but after looking at StackOverflow turns out I could have used # instead of -.
I do not know the specifics of why this is not working but I thought it would be worth mentioning somewhere that perhaps:
I see that string (platform specific) on the page and a link to the documentation but it was not obvious on that page what I had to do either :/
The text was updated successfully, but these errors were encountered: