How to convert string to date?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
1
Vastaa
22794
Näkymät
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()
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
3
heinäk. 23
|
27894 | ||
|
2
kesäk. 22
|
6135 | ||
|
2
syysk. 21
|
5250 | ||
|
1
marrask. 20
|
8521 | ||
|
2
maalisk. 19
|
6508 |
Try this: https://learnopenerp.blogspot.com/2021/07/how-to-use-and-convert-date-field-format-odoo.html