DATE 相關的Function
1、年月日相加減
Date +/- year/month/day (into the future/past)
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = l_date
days = '00'
months = p_month
signum = '-'
years = '00'
IMPORTING
calc_date = l_date.
date為輸入的日期,months要加或減的月份,也可以用days or years,signum為咚惴?..
2、得到本日是第幾周
Returns week for a date
*---> get week number
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = in_budat
IMPORTING
week = l_week
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
3、得到本週的第一天
Return first day for a week
*---> get first day of week
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = l_week
IMPORTING
date = it_week-week_dt
EXCEPTIONS
week_invalid = 1
OTHERS = 2.
4、得到本日是本星期的第幾天
CALL FUNCTION 'DAY_IN_WEEK'
EXPORTING
datum = p_date1
IMPORTING
wotnr = l_day.
5、Check 轉入日期是否正確
Date plausibility check
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = it_excel-redat
EXCEPTIONS
plausibility_check_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
it_err-ecode = '10'.
it_err-evalue = it_excel-redat.
it_err-ereason = 'Release Date is not valid'.
APPEND it_err.
endif.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90072/viewspace-927108/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- JavaScript中的Date,RegExp,Function物件JavaScriptFunction物件
- SAP MM 預製發票相關的Function ModulesFunction
- Django筆記十五之in查詢及date日期相關過濾操作Django筆記
- QQ瀏覽器Date相關函式實現不符合ECMA規範瀏覽器函式
- 關於 HANA CE FunctionFunction
- Mysql關於procedure、function的詳解MySqlFunction
- 徹底搞懂Object和Function的關係ObjectFunction
- Word的相關操作
- Cookie的相關操作Cookie
- vim的相關指令
- javascript 中function(){},new function(),new Function(),Function 摘錄JavaScriptFunction
- java.util.function 中的 Function、Predicate、ConsumerJavaFunction
- 字串的相關函式字串函式
- Linux相關的操作指令Linux
- Redis的相關知識Redis
- /proc的相關知識
- 樹的相關術語
- 時間相關的操作
- Date
- 關於盒模型相關的問題模型
- 關於Python Number 相關的知識!Python
- 區塊鏈相關的關鍵概念區塊鏈
- PHP相關PHP
- AndroidJNI相關Android
- 【Unity】相關Unity
- PDN相關
- Linux相關Linux
- Git相關Git
- Cookie相關Cookie
- 硬碟相關硬碟
- sql相關SQL
- elasticsearch相關Elasticsearch
- CentOS相關CentOS
- swoole 相關
- npm 相關NPM
- bean相關Bean
- RFID相關
- spring 相關Spring
- mysql 相關MySql