github.com/BurntSushi/j...
github.com/BurntSushi/j...
for figuring out the weird combination of identifiers you want for specific date and time formatting: e.g. "%B %d, %Y"
www.strfti.me
for figuring out the weird combination of identifiers you want for specific date and time formatting: e.g. "%B %d, %Y"
www.strfti.me
strPtime has the P for “parse time”
So it'll accept a string and Parse a time from it.
strFtime has the F for “from time” or “format time”
So it'll accept a time/date/datetime and Format it as a string.
You're welcome 🤗
strPtime has the P for “parse time”
So it'll accept a string and Parse a time from it.
strFtime has the F for “from time” or “format time”
So it'll accept a time/date/datetime and Format it as a string.
You're welcome 🤗
- The "p" (strptime) is for parsing, getting a datetime from a string
- The "f" (strftime) is for formatting, getting a string from a datetime
For help remembering the format codes, turn to buff.ly/oEdYGMI !
- The "p" (strptime) is for parsing, getting a datetime from a string
- The "f" (strftime) is for formatting, getting a string from a datetime
For help remembering the format codes, turn to buff.ly/oEdYGMI !
Read more 👉 https://trey.io/l4b84k
#Python
Read more 👉 https://trey.io/l4b84k
#Python
Built the Pixela graph today:
• POST request
• Added headers/body
• Printed response
• Added daily “pixel”
• Auto date with strftime()
Part 3 next ✨
#Python #API #buildinpublic
Built the Pixela graph today:
• POST request
• Added headers/body
• Printed response
• Added daily “pixel”
• Auto date with strftime()
Part 3 next ✨
#Python #API #buildinpublic
2021 142
2022 185
2023 137 (incomplete data)
2024 186
2025 147 (so far)
Last December had 35 so still time for this year to catch up!
2021 142
2022 185
2023 137 (incomplete data)
2024 186
2025 147 (so far)
Last December had 35 so still time for this year to catch up!
SQL Daily Challenge:✅
Banki Review (SQL): ✅
Today I learned about the STRFTIME() function in SQL, which is really good for filtering dates
SQL Daily Challenge:✅
Banki Review (SQL): ✅
Today I learned about the STRFTIME() function in SQL, which is really good for filtering dates
summer of bliss, pending release, HTTPS-RR, strftime, QUERY
summer of bliss, pending release, HTTPS-RR, strftime, QUERY
Format dates with f-strings. 🧵
datetime objects support the same format codes in f-string format specifiers that the strftime method uses:
>>> deadline = datetime(2046, 10, 31, 15, 46)
>>> f"{deadline:%m/%d/%Y %I:%M %p}"
'10/31/2046 03:46 PM'
#Python #DailyPythonTip
Format dates with f-strings. 🧵
datetime objects support the same format codes in f-string format specifiers that the strftime method uses:
>>> deadline = datetime(2046, 10, 31, 15, 46)
>>> f"{deadline:%m/%d/%Y %I:%M %p}"
'10/31/2046 03:46 PM'
#Python #DailyPythonTip
Coding goals for the day:
SQL Daily Challenge:✅
Banki Review (SQL): ✅
Today the STRFTIME() function in SQL returned with a vengeance, but it really is a good way to filter dates
Coding goals for the day:
SQL Daily Challenge:✅
Banki Review (SQL): ✅
Today the STRFTIME() function in SQL returned with a vengeance, but it really is a good way to filter dates
>>> f"Published on {deadline:%B %d, %Y}"
'Published on October 31, 2046'
To this strftime call:
>>> "Published on " + deadline.strftime("%B %d, %Y")
'Published on October 31, 2046'
I usually prefer f-strings here: I'm used to reading them, so they feel more natural.
>>> f"Published on {deadline:%B %d, %Y}"
'Published on October 31, 2046'
To this strftime call:
>>> "Published on " + deadline.strftime("%B %d, %Y")
'Published on October 31, 2046'
I usually prefer f-strings here: I'm used to reading them, so they feel more natural.
You can pass a configuration object to Date.toLocaleDateString, it’s about the same as Intl.DateTimeFormat
It’s not quite c strftime(), but it’s probably usable.
It is odd that there isn’t a strftime since javascript engines are usually implemented in c++
You can pass a configuration object to Date.toLocaleDateString, it’s about the same as Intl.DateTimeFormat
It’s not quite c strftime(), but it’s probably usable.
It is odd that there isn’t a strftime since javascript engines are usually implemented in c++