on 04-09-2007 1:57 PM
Hi all,
I am having date in '31.12.2006'.
I want to convert the date into '20061231'
How to do that in command lines.
suppose
&vbrk-fkdate& is holding '31.12.2006'
/: Define &my_yyyy& = &vbrk-fkdate+6(4)& -
> 2006
/: Define &my_mm& = &vbrk-fkdate+3(2)& -
> 12
/: Define &my_dd& = &vbrk-fkdate+0(2)& -
> 31
upto this it is ok.
now i want to concatenate &my_yyyy& &my_mm& &my_dd&
Helpful answeres are rewarded surely. or help me in comparing the vbrk-fkdat in other ways in command lines.
Hi Priyanka,
What is the type of the vbrk-fkdate? If it is of DATUM type, then you don't need to convert it to yyyymmdd format. It is internally stored as YYYYMMDD only.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priyanaka,
there is a simple procedure for converting the date into yyyymmdd format.
just say:
DATA: l_date LIKE sy-datum,
l_date = sy-datum.
WRITE:l_date TO l_date.
Reward points if helpful.
Regards,
Deepthi Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to assign it to any sy-datum type field and it will work.
assign points if it helps.
-Gaurang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai,
Its all depends on the settings made at the end system.
So you need to vonvert the date accordingly.
Here is the solution procedure.....
There are 6 diffent types of date formats type 1 to 6.
These are stored in USR01 table in DATFM field WHICH CAN BE SET by:(when abap program is opened) there Go to:
System>User Profile>Own data-->defaults
if DATFM IS 1.
write your conversion code
(like my_dd = date+0(2) etc..)
Once you got dd,mm,yyyy you can easily concatenate as you want.
If still not clear i can clearly go once more.
Hope you got it.
Reward points if it helps you.
Regds,
Rama chary.Pammi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thanks for your suggestions.
the solution is
I am having date in format '31.12.2006'.
/: SET DATE MASK = 'YYYYMMDD'. -
>to convert the date into '20061231'
/: SET DATE MASK = ''. -
> to reset date mask i mean to format '31.12.2006'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
&my_yyyy& &my_mm& &my_dd&
It will concatenate the fields.
Regards,
ananth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..,
use PERFORM .. ENDPERFORM in script...
pass this date to your program..
change it there ... and send it to the script again..
regards,
sai ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.