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
- 项目
- MRP
此问题已终结
1
回复
23146
查看
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
|
28749 | ||
|
|
2
6月 22
|
6412 | ||
|
|
2
9月 21
|
5666 | ||
|
|
1
11月 20
|
9000 | ||
|
|
2
3月 19
|
6761 |
Try this: https://learnopenerp.blogspot.com/2021/07/how-to-use-and-convert-date-field-format-odoo.html