so i have this line of code here
ir_sequence_date = str (fields.Date.today())[:10]
I don't understand what's the use of [:10] , does anyone have a clue what it's for?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
so i have this line of code here
ir_sequence_date = str (fields.Date.today())[:10]
I don't understand what's the use of [:10] , does anyone have a clue what it's for?
To display only Date and not show time in that case will use. Example, 29/05/2020 date contain only 10 digits.
Hi,
This will give you first 10 letters of the corresponding string. Suppose if str (fields.Date.today()) is abcdefghijkl and if you do str (fields.Date.today())[:10] , the result will be abcdefghij (first 10) .
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Registracija| Related Posts | Replies | Rodiniai | Veikla | |
|---|---|---|---|---|
|
1
geg. 20
|
5661 | |||
|
2
spal. 25
|
2027 | |||
|
3
spal. 23
|
10816 | |||
|
1
rugs. 23
|
4041 | |||
|
1
geg. 23
|
3027 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Please use a meaningful title.