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 in Python by ana1504.k
• 7,430 points
14 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 by SDeb
• 12,280 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
13 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 4, 2018 in Python by Omkar
• 67,120 points

edited Aug 8, 2018 by Omkar 387 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
• 56,160 points
61 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
• 56,160 points
1,724 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
106 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
• 56,160 points
89 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 in Python by SDeb
• 12,280 points
36 views