Hello;
Please, who knows how to compare to fields datetime in odoo v8.
Thanks a lot in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello;
Please, who knows how to compare to fields datetime in odoo v8.
Thanks a lot in advance
what about literal comparison
a < b
or
a > b
or
a == b
?
default date and datetime formats in odoo allow you to compare literally datetime or date strings and result of such comparison will correspond to the comparison of corresponding dates.
You can use normal python datetime code to compare it.
Thanks.
Please, what do you mean by use normal python datetime code. Can you give me an example please
Follow this Link https://docs.python.org/2/library/datetime.html and read the python datetime doc
Thanks a lot for the link
Dear Drees Far,
I think this example may be use full
>>> from datetime import datetime
>>> past = datetime.now()
>>> present = datetime.now()
>>> past < present
True
>>> datetime(2012, 1, 1) > present
False
>>> present - datetime(2000, 4, 4)
datetime.timedelta(4242, 75703, 762105)
Regards,
Ankit H Gandhi
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Mar 25
|
355 | ||
|
0
Jan 25
|
2589 | ||
|
1
Aug 23
|
13382 | ||
change password
Solved
|
|
1
Aug 23
|
12247 | |
|
1
Jul 23
|
9339 |