Amazing-Python-Scripts

Форк
0

..
/
Run-Script-At-a-Particular-Time 
4 года назад
readme.md

DateTime

The datetime module supplies classes for manipulating dates and times. for ex: to Import the datetime module and display the current date:

import datetime x = datetime.datetime.now() print(x) When we execute the code from the example above the result will be:

2021-01-14 23:14:32.037299 The date contains year, month, day, hour, minute, second, and microsecond.

method for saving it as a different file once code is executed: The datetime object has a method for formatting date objects into readable strings. The method is called strftime(), and takes one parameter, format, to specify the format of the returned string:

Setup instructions

actually we have used datetime library of python so if its not installed previously please run command pip install DateTime in terminal Now simply run the code and set the output in the newly formed file with the name as current date .

Output

the output file is formed with the name of current date and time and the content of file as per script of code.

Author(s)

vaishnavi jha

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.