Getting the Current Date and Time
2013-04-03 20:08
369 查看
Getting the Current Date and Time
To retrieve the current date and time, we can use a function called
get that information.
In a later course, you'll learn all aboutfunctions.
For now, just know that
on a piece of code that comes with Python that figures out the current date and time for us.
INSTRUCTIONS
Create a variable called
store the result of
it. We'll use this variable in the next exercise.
Go ahead and print the value of the variable
To retrieve the current date and time, we can use a function called
datetime.now()to
get that information.
In a later course, you'll learn all aboutfunctions.
For now, just know that
datetime.now()calls
on a piece of code that comes with Python that figures out the current date and time for us.
from datetime import datetime now=datetime.now() print now
INSTRUCTIONS
Create a variable called
nowand
store the result of
datetime.now()in
it. We'll use this variable in the next exercise.
Go ahead and print the value of the variable
now.
相关文章推荐
- #370 – 通过绑定显示当前时间(Binding a Label’s Content to the Current Date and Time)
- 5.33Java 三星题 current date and time
- The difference between the request time and the current time is too large.阿里云oss上传图片报错
- [Error Code]:RequestTimeTooSkewed, [Message]:The difference between the request time and the current
- Get current time and date on Android
- 三星题:(Current date and time)
- [原] XAF How to see and edit the time part in the DatePropertyEditor for the System.DateTime property
- JavaSE8-The New Date and Time API(1)
- Formatting Time and Date: The Time and Date Format Suffixes
- The difference between the request time and the current time is too large.
- JavaSE8-The New Date and Time API(2)
- tsm客户端 the system date and use the ACCEPT DATE command to establish the current
- OSS存储上遇到The difference between the request time and the current time is too large.
- get the current system time and print it
- 2.5 Picking the Date and Time with UIDatePicker
- JAVA Current date and time
- 亚马逊S3 - The difference between the request time and the current time is too large.
- Could I use NEON and VFP at the same time in my application?
- Java Date and Time系列(二)- System.currentTimeMillis()介绍
- XSD Date and Time Data Types