Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Store a Specific Date (and Time) | Python Basics: Date and Time Mastery
Python Basics: Date and Time Mastery
course content

Contenido del Curso

Python Basics: Date and Time Mastery

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.

Tarea

  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.

Tarea

  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.

Mark tasks as Completed
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

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.

Tarea

  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.

Mark tasks as Completed
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 1. Capítulo 2
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt