Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to format a date string?

Former Member
0 Likes
640

Hi guys!

How can i format a date which comes from the database in format eg '20080131' into a nice display format?

in particular i want to display my date like 'DD.MM.YYYY'

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
608

THe simplest way would be to use Offsets and Concatenate statement

For eg.

v_date = '20080723'.

something like:

CONCATENATE v_date6(2) '.' v_date4(2) '.' v_date+0(4) INTO v_new_date

THe simplest way would be to use Offsets and Concatenate statement

For eg.

v_date = '20080723'.

something like:

CONCATENATE v_date6(2) '.' v_date4(2) '.' v_date+0(4) INTO v_new_date

3 REPLIES 3
Read only

Former Member
0 Likes
609

THe simplest way would be to use Offsets and Concatenate statement

For eg.

v_date = '20080723'.

something like:

CONCATENATE v_date6(2) '.' v_date4(2) '.' v_date+0(4) INTO v_new_date

Read only

Former Member
0 Likes
608

hi,

Use EDIT MASK and the type to get the Functionality.

data date like sy-datum.
date = <your date>.

write:/ date using EDIT MASK '__/__/____'.

Regards

Sumit Agarwal

Read only

Former Member
0 Likes
608

thomas,

if date = 20080131.

than concatenate date+6(2) '.' date+4(2) '.' date+0(4) '.' into newdate.

Amit.