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
回覆
22784
瀏覽次數
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
|
27893 | ||
|
2
6月 22
|
6132 | ||
|
2
9月 21
|
5248 | ||
|
1
11月 20
|
8516 | ||
|
2
3月 19
|
6508 |
Try this: https://learnopenerp.blogspot.com/2021/07/how-to-use-and-convert-date-field-format-odoo.html