Application Development 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: 

is there any function module for dividing the date and time

Former Member
0 Kudos

Hi,

I have a problem i have a field in that date and time like this 20081015230000 .

i want only date like 20081015 please help me if is there any function module to divide date and time.

Regards

1 ACCEPTED SOLUTION

former_member222860
Active Contributor
0 Kudos

Hi,

check this

CIF_GEN_CONVERT_TIMESTAMP

regards\

Mahesh

6 REPLIES 6

Former Member
0 Kudos

hi,

i think you can take the first 8 character use offset method to get this ... i dont think any function module is needed for this

Former Member
0 Kudos

Hello,

Y r u going for FM instead just used the offset and store it in other variable.

For EX :-

Data : var1(14) type c '20081216234559',

var2(8) type c.

var2 = var1+0(8).

write : var2.

Former Member
0 Kudos

Hi,

Declare date variable as d and splite that dayand time value pass to this date varaiable.

Regards

Md.MahaboobKhan

Former Member
0 Kudos

hi

u can use any of these method

1.use command CONVERT TIMESTAMP

2.u can split the method using '+' using offset method

former_member222860
Active Contributor
0 Kudos

Hi,

check this

CIF_GEN_CONVERT_TIMESTAMP

regards\

Mahesh

Former Member
0 Kudos

If the format is fixed then you can assign first 8 chars to a date variable.

for example:

date_time = 20081015230000

date = date_time+0(8).

If date_time format is not fixed then we need to think of other options.

Let me know if it is not static.

Mubeen