datetime datetime now 1

0 votes
I want to add 1 day with 3 hours + datetime.now in the following:

mante = Employee()
mante.usercompany = idnamez
mante.knowledgelost = datetime.datetime.now()+1 day more 3 hours.
mante.seguemplelost = datetime.datetime.now()+1
mante.put()
 

Anyone knows how to do it?
Mar 11, 2019 in Python by ana1504.k
• 7,910 points
502 views

1 answer to this question.

0 votes
You can write the code as follows :
 

datetime.datetime.now() + datetime.timedelta(days=1, hours=3)
answered Mar 11, 2019 by SDeb
• 13,300 points

Related Questions In Python

0 votes
1 answer

Write dates as datetime objects

from datetime import datetime datetime_object = datetime.strptime('Aug 23 ...READ MORE

answered Apr 18, 2018 in Python by Nietzsche's daemon
• 4,260 points
431 views
+3 votes
2 answers

how to print array integer without [] bracket in python like result = 1,2,3,4,5

Hey @abhijmr.143, you can print array integers ...READ MORE

answered Aug 5, 2018 in Python by Omkar
• 69,210 points

edited Aug 8, 2018 by Omkar 7,661 views
0 votes
1 answer

What is the meaning of “int(a[::-1])” in Python?

Assumming a is a string. The Slice ...READ MORE

answered Aug 27, 2018 in Python by Priyaj
• 58,090 points
6,130 views
0 votes
1 answer

1 Year Rolling mean pandas on column date

I believe this should work for you: # ...READ MORE

answered Sep 6, 2018 in Python by Priyaj
• 58,090 points
14,022 views
0 votes
1 answer

how to download and install Django rest framework?

To install Django, you can simply open ...READ MORE

answered Apr 24, 2018 in Python by Christine
• 15,790 points
1,598 views
0 votes
1 answer
0 votes
1 answer

Host not allowed

Go to your project directory cd project cd project ALLOWED_HOSTS ...READ MORE

answered Aug 9, 2018 in AWS by Priyaj
• 58,090 points
1,473 views
0 votes
11 answers
0 votes
1 answer

python 'x days ago' to datetime

You just need a timedelta and try ...READ MORE

answered Feb 26, 2019 in Python by SDeb
• 13,300 points
2,538 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP