Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
One More Formatting | Working with Dates
Dealing with Dates and Times in Python
course content

Course Content

Dealing with Dates and Times in Python

Dealing with Dates and Times in Python

1. Working with Dates
2. Working with Times
3. Timezones and Daylight Savings Time (DST)
4. Working with Dates and Times in pandas

bookOne More Formatting

Let's practice more with date formats! The table with the most common codes is below.

Format codeMeaningExample
%dDay of the month as a zero-padded decimal number01, 02, ..., 30, 31
%mMonth as a zero-padded decimal number01, 02, ..., 11, 12
%yYear without century as a zero-padded decimal number00, 01, 02, ..., 98, 99
%YYear with century as a decimal number0001, 0002, 1999, 2000, 2001, ...
%bMonth as locale’s abbreviated nameJan, Feb, ..., Nov, Dec
%BMonth as locale’s full nameJanuary, February, ..., November, December
%aWeekday as locale’s abbreviated nameSun, Mon, ..., Fri, Sat
%AWeekday as locale’s full nameSunday, Monday, ..., Friday, Saturday

Task

Format the same date object as before into the format: "Wednesday, 11 of March, 1998".

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 6
toggle bottom row

bookOne More Formatting

Let's practice more with date formats! The table with the most common codes is below.

Format codeMeaningExample
%dDay of the month as a zero-padded decimal number01, 02, ..., 30, 31
%mMonth as a zero-padded decimal number01, 02, ..., 11, 12
%yYear without century as a zero-padded decimal number00, 01, 02, ..., 98, 99
%YYear with century as a decimal number0001, 0002, 1999, 2000, 2001, ...
%bMonth as locale’s abbreviated nameJan, Feb, ..., Nov, Dec
%BMonth as locale’s full nameJanuary, February, ..., November, December
%aWeekday as locale’s abbreviated nameSun, Mon, ..., Fri, Sat
%AWeekday as locale’s full nameSunday, Monday, ..., Friday, Saturday

Task

Format the same date object as before into the format: "Wednesday, 11 of March, 1998".

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 6
toggle bottom row

bookOne More Formatting

Let's practice more with date formats! The table with the most common codes is below.

Format codeMeaningExample
%dDay of the month as a zero-padded decimal number01, 02, ..., 30, 31
%mMonth as a zero-padded decimal number01, 02, ..., 11, 12
%yYear without century as a zero-padded decimal number00, 01, 02, ..., 98, 99
%YYear with century as a decimal number0001, 0002, 1999, 2000, 2001, ...
%bMonth as locale’s abbreviated nameJan, Feb, ..., Nov, Dec
%BMonth as locale’s full nameJanuary, February, ..., November, December
%aWeekday as locale’s abbreviated nameSun, Mon, ..., Fri, Sat
%AWeekday as locale’s full nameSunday, Monday, ..., Friday, Saturday

Task

Format the same date object as before into the format: "Wednesday, 11 of March, 1998".

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Let's practice more with date formats! The table with the most common codes is below.

Format codeMeaningExample
%dDay of the month as a zero-padded decimal number01, 02, ..., 30, 31
%mMonth as a zero-padded decimal number01, 02, ..., 11, 12
%yYear without century as a zero-padded decimal number00, 01, 02, ..., 98, 99
%YYear with century as a decimal number0001, 0002, 1999, 2000, 2001, ...
%bMonth as locale’s abbreviated nameJan, Feb, ..., Nov, Dec
%BMonth as locale’s full nameJanuary, February, ..., November, December
%aWeekday as locale’s abbreviated nameSun, Mon, ..., Fri, Sat
%AWeekday as locale’s full nameSunday, Monday, ..., Friday, Saturday

Task

Format the same date object as before into the format: "Wednesday, 11 of March, 1998".

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 6
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt