on 08-18-2008 1:17 PM
Hi ,
Please give me the syntax to find the date exactly 1 week back and 2 weeks back.
Another question is ....how do I change date formats , please give me syntax.
Thanks in advance.
Hi,
To get before week day date just subtract 7 days form the field of type D. like this for two week also we can do.
to write date in desired formate just write the formate option beside the date field. like
write: sy-date, mm/dd/yyyy.
for more details write edit at any place of program and press F1 to get system help where we can choose own date format.
Regards,
Aswini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramana,
date exactly 1 week back:
w_date = sy-datum - 7.
date exactly 2 weeks back:
w_date = sy-datum - 14.
Check out this link for date format changes:
http://www.sap-basis-abap.com/sd/date-format-changes.htm
Regards,
Chandra Sekhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
result_date = sy-datum - 7.
result_date = sy-datum - 14.
These two statements will give you the date of exactly one week ago and two weeks ago respectively...
set the date format in user profile
regards
padma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
data:w_date type sy-datum.
w_date = sy-datum - 7. " For 1 week back from current date.
w_date = sy-datum - 14. " For 2 week from current date.
Regards,
sujit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.