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

Regading date format

Former Member
0 Likes
997

can any one help me out in converting the date to ddmmyyyy

my input date is as yyyymmdd

can any one tell me the function module to covert the date to ddmmyyyy.

thanks in advace.

9 REPLIES 9
Read only

Former Member
0 Likes
916

Hi,

Use the FM : CONVERT_DATE_TO_ALPHA_NUMERIC

Thanks,

Sandeep.

Read only

Former Member
0 Likes
916

Hi,

data: date_new(8).

concatenate sy-datum6(2) sy-datum4(2) sydatum(4) into date_new.

Regards, Dieter

Read only

varma_narayana
Active Contributor
0 Likes
916

Hi..

Try the FMs

CONVERT_DATE_TO_INTERNAL

CONVERT_DATE_TO_EXTERNAL

<b>Reward if Helpful</b>

Read only

Former Member
0 Likes
916

Hi Siva,

use this FM

CONVERSION_EXIT_IDATE_INPUT

If user has option to give any of format ie,

mmddyyyy or ddmmyyyy and convert to yyyymmdd

it will be difficult for us to do.

suppose if user want to give march 05 2007

he has option to give 03052007 or 05032007.

by coding also we cannot know whether first two digits represents day or month

str = 31122007

year = str + 4(4).

month = str + 2(2).

date = str + 0(2)

concatenate year month date to str1.

reward points to all helpful answers

kiran.M

Message was edited by:

KIRAN KUMAR

Read only

Former Member
0 Likes
916

Hi

the function module name is

<b><u>HRGPBS_HESA_DATE_FORMAT</u></b>

this will do this

Format a date valid for HESA: DD/MM/YYYY

reward if usefull

Read only

Former Member
0 Likes
916

Hi

this is the information about the FM

<b><u>HRGPBS_HESA_DATE_FORMAT</u></b>

Format a date valid for HESA: DD/MM/YYYY

Functionality

This module returns a given date in string format "dd/mm/yyyy" with dd = day, mm = month and yyyy = year.

An empty date is returned as space.

This is the required format for HESA reporting.

Example

"19991224" is returned as "24/12/1999".

"00000000" is returned as " " (ten spaces).

Parameters

P_DATE

DATESTRING

Exceptions

Function Group

HRGPBS_HESA_BASIS

reward if usefull

Read only

0 Likes
916

Hi,

Im my PO date (eket-bedat) display out is 01012007 and i want to use this fm to make it become dd/mm/yyyy. how should i code it out?

Is that i need to initial it with the fm?

Thank you.

Read only

Former Member
0 Likes
916

Hi,

USe this fn module CY_CONVERT_DATE

Read only

Former Member
0 Likes
916

Hi,

You can use offset. Try like this:

data : a_date(8), "yyyymmdd

t_date(8), "ddmmyyyy

dd(2),

mm(2),

yyyy(4).

dd = a_date+6(2).

mm = a_date+4(4).

yyyy = a_date+0(4).

concatenate dd mm yyyy into t_date.

write t_date.

Regards,

Bhaskar