0

I am able to get the current time using the below code

import datetime
current_time = print(datetime.datetime.now())
Output : 2018-04-30 14:09:58.483829

I would however like to remove the decimal portion and only display 2018-04-30 14:09:58. How could I get this value. Thanks..

2
  • nice dupe find!! and nice python 3 gold :) Commented Apr 30, 2018 at 8:47
  • Thanks Kasramvd.. Commented Apr 30, 2018 at 8:50

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.