How to convert string to date?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
22805
查看
How to convert string to date?
Hello Giezel Esteves,
Here is the python code to convert string to date.
import datetimeHere "24052010" is string. you can pass a variable at here.
datetime.datetime.strptime('24052010', '%d%m%Y').date()
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
3
7月 23
|
27909 | ||
|
2
6月 22
|
6142 | ||
|
2
9月 21
|
5261 | ||
|
1
11月 20
|
8538 | ||
|
2
3月 19
|
6516 |
Try this: https://learnopenerp.blogspot.com/2021/07/how-to-use-and-convert-date-field-format-odoo.html