跳至內容
選單
此問題已被標幟
1 回覆
5760 瀏覽次數

Hi community,

I need to take a day from o.date_invoice can someone help me

Thanks for yours opinions

頭像
捨棄
最佳答案

Hello Giovanni,

You can get this with 2 ways.

(1) You can pass this date via function and convert this to date and get day from that.

Ex. In .py file

from datetime import datetime

In Init method update localcontext with {'get_day' : self.get_day}

def get_day(date_string): date = datetime.strptime(date_string , '%Y-%m-%d') return date.day

In ODS file.

You can call this method with Key name which is passed inside localcontext and pass o.date_invoice to it.

(2) You can pass datetime library from localcontext and access inside ODS file.

Thanks, Serpent Consulting Services.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
7月 22
1556
1
12月 15
3407
0
5月 15
3588
1
3月 15
4217
1
3月 15
4248