fromtimestamp()

fromtimestamp() : returns date and time by using POSIX timestamp

Get all details about Timestamp and generate timestamp
by using Calendar and time sliders.


Getting present timestamp
from datetime import datetime
timestamp = datetime.timestamp(datetime.now())
print("Present Timestamp : ",timestamp)
Output
Present Timestamp :  1568717876.556073
Using Timestamp as input we will use fromtimestamp() to get date and time
from datetime import datetime
timestamp = datetime.timestamp(datetime.now())
print("Present Timestamp : ",timestamp)
dt=datetime.fromtimestamp(timestamp)
print(dt)
Output
Present Timestamp :  1568717943.760438
2019-09-17 16:29:03.760438
You can use above mentioned timestamp genegrator and use this as input to generate date and time.

All Date Objects
Your Rating




Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer