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
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
1
Répondre
22770
Vues
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()
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
3
juil. 23
|
27888 | ||
|
2
juin 22
|
6128 | ||
|
2
sept. 21
|
5245 | ||
|
1
nov. 20
|
8511 | ||
|
2
mars 19
|
6504 |
Try this: https://learnopenerp.blogspot.com/2021/07/how-to-use-and-convert-date-field-format-odoo.html