cancel
Showing results for 
Search instead for 
Did you mean: 

with in smart forms i need time format like 12:26:37

Former Member
0 Kudos

hi,

in smart forms time format is coming to one variable time in this format 122637, but i need this format 12:26:37

plz tell me the answer.

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

/: SET TIME MASK = 'HH:MM:SS'

Former Member
0 Kudos

hi ,

/;set time mask = 'HH.MM.SS'.

this is not working in smart form ....the time is in one variable..

can u tell me how to change format exact code..

thanks.

Former Member
0 Kudos

Hi

Check this:

REPORT  ztest_time_conv.
 
DATA: hour(2) TYPE n,
      min(2) TYPE n,
      sec(2) TYPE n,
      tim TYPE i.
DATA: time TYPE p DECIMALS 2.
DATA: timeformat TYPE sy-uzeit.
time = '1.38'.
 
tim = time * 3600.
hour = tim DIV 3600.
tim = tim MOD 3600.
min = tim DIV 60.
sec = tim MOD 60.
 
 
CONCATENATE hour min sec INTO timeformat.
WRITE timeformat.
BREAK-POINT.

PS:Code given by Vijay Babu Dudla in other thread..in ABAP general..when I pasted the link,it did not work..so I am giving it here like this.

Regards,

VIshwa.

Edited by: Vishwa Sri Hari on Nov 5, 2008 1:01 PM

Former Member
0 Kudos

if the time is in variable say g_time then use the set time mask before printing that variable

/: SET TIME MASK = 'HH:MM:SS'

/ &G_TIME&

Edited by: sreekanth reddy on Nov 5, 2008 1:32 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Take a new variable of type TIMS and pass the value in that. And put that variable directly in the layout, it will convert the time format automatically and will print it.

- Hemant

Former Member
0 Kudos

Hi

Use the system variable for time. &sfsy-time&..you will get the required way.

Regards,

Vishwa.