CodeSolved

Solved Programming Questions & Exercises

Showing the current date and clock

Practice Easy 344/ Download 1038 Views

Write a program that prints the current date and time in the output

11 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
from time import *
print(ctime(time()))
Zaras Download Python
from datetime import datetime
# Getting the time and date of the present
now = datetime.now()
# Output format
formatted_time = now.strftime("%Y-%m-%d %H:%M:%S")
print("")

Amir.code Download Python
import datetime
today=datetime.datetime.now()
formatted_date=today.strftime('%Y-%m-%d %H:%M:%S')
print(formatted_date)
Maryam.n Download Python
from datetime import datetime
data = datetime.today() 
print(data)
Nima1393 Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close