Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cc88f7f

Browse files
Updated Folder Name
1 parent c237bca commit cc88f7f

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
# DateTime
2-
3-
The datetime module supplies classes for manipulating dates and times.
4-
for ex: to Import the datetime module and display the current date:
5-
6-
import datetime
7-
x = datetime.datetime.now()
8-
print(x)
9-
When we execute the code from the example above the result will be:
10-
11-
2021年01月14日 23:14:32.037299
12-
The date contains year, month, day, hour, minute, second, and microsecond.
13-
14-
method for saving it as a different file once code is executed:
15-
The datetime object has a method for formatting date objects into readable strings.
16-
The method is called strftime(), and takes one parameter, format, to specify the format of the returned string:
17-
18-
## Setup instructions
19-
20-
actually we have used datetime library of python so if its not installed previously please run command pip install DateTime in terminal
21-
Now simply run the code and set the output in the newly formed file with the name as current date .
22-
23-
## Output
24-
25-
the output file is formed with the name of current date and time and the content of file as per script of code.
26-
27-
## Author(s)
28-
29-
vaishnavi jha
1+
# DateTime
2+
3+
The datetime module supplies classes for manipulating dates and times.
4+
for ex: to Import the datetime module and display the current date:
5+
6+
import datetime
7+
x = datetime.datetime.now()
8+
print(x)
9+
When we execute the code from the example above the result will be:
10+
11+
2021年01月14日 23:14:32.037299
12+
The date contains year, month, day, hour, minute, second, and microsecond.
13+
14+
method for saving it as a different file once code is executed:
15+
The datetime object has a method for formatting date objects into readable strings.
16+
The method is called strftime(), and takes one parameter, format, to specify the format of the returned string:
17+
18+
## Setup instructions
19+
20+
actually we have used datetime library of python so if its not installed previously please run command pip install DateTime in terminal
21+
Now simply run the code and set the output in the newly formed file with the name as current date .
22+
23+
## Output
24+
25+
the output file is formed with the name of current date and time and the content of file as per script of code.
26+
27+
## Author(s)
28+
29+
vaishnavi jha

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /