2006 May 10 6:34 PM
Hi,
How do I get Month from creation date.
If Creation date is 05/01/2004 then I want month as 05.
Thanks
Veni.
2006 May 10 6:36 PM
Because all dates in R/3 are stored in the database and in memory as YYYYMMDD, not like the external format 05/01/2004. So at runtime, in order to access the month, you must move 4 places to the left and get the next two characters. Make sense?
Regards,
Rich Heilman
2006 May 10 6:36 PM
2006 May 10 6:40 PM
Veni,
VBAK-ERDAT+4(2) will give you the month.
I have given the sample code you were looking for in the other thread.
Regards,
Ravi
Note : Please mark the helpful answers
2006 May 10 6:41 PM
Hi Veni,
try this...
data: month(2) .
month = creation_date+0(2).
Regards,
Tanveer.
<b>Please mark helpful answers</b>
Preety much..Thanks..All i considered was the above case..
Thanks..
2006 May 10 6:48 PM
2006 May 10 11:24 PM
Hi Veni,
In SAP the date will be in the 20040501(YYYYMMDD) format.
For example if the creation date is 05/01/2004 it will be stored as 20060510 in SAP.To get the month use the substring.
data : Month(2).
Month = date+4(2)
This will give you the month 05.
Rgds,
Rama
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |