Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Store a Specific Date (and Time) | Organizing Date and Time Data for Analysis and Applications
Organizing Date and Time Data for Analysis and Applications
course content

Kursusindhold

Organizing Date and Time Data for Analysis and Applications

book
Store a Specific Date (and Time)

To store a date and time in Python using the datetime module, you can use the datetime class to create a datetime object representing the date and time you want to store.

Opgave

Swipe to start coding

  1. Import the datetime library;
  2. Get the current date and time (.now());
  3. Create a variable with a specific date (and time). You can choose whichever date you prefer.

Once you've completed this task, click the button above the code to check your solution.

Løsning

Mark tasks as Completed
Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 2
AVAILABLE TO ULTIMATE ONLY
Vi beklager, at noget gik galt. Hvad skete der?
some-alt