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: 

Date and Time in Words

Former Member
0 Kudos
128

Hi All,

I am looking for a function module, which can convert Date and Time in words.

For example, date & time as 25/12/2008 8.30 AM.

In words it should print like,

Twenty Fifth December Two Thousand Eight and Eight thirty AM.

Please let me know if there is any function module exists which can convert date and time in words.

Thanks in Advance,

Arun

2 REPLIES 2

Former Member
0 Kudos
41

Hi Arun,

Don't think there is any such FM. You may need to write your own. You can write based on the FM SPELL_AMOUNT.

Regards,

Atish

Former Member
0 Kudos
41

Hi,

Function module SPELL_AMOUNT should do the job.

You probably should split the time into 3 pieces:

codemy_time(2) -> 12 -> FM -> Twelve, then add the word Hours

my_time+3(2) -> 12 -> FM -> Twelve, then add the word Minutes

my_time+6(2) -> 05 -> FM -> Five, then add the word Seconds[/code]

You can use the CONCATENATE command to put all of these words together.

You can also check out this posting:

Split the time into HOUR and MINUTES and Seconds

(12:45:34)

pass individual figure into table T015Z

it will give the output like TWELEVE, FORTY FIVE, THIRTY FOUR

now you concatenate all with hours, minutes and seconds and use

Reward points for useful Answers.

Regards,

Harini.S