cancel
Showing results for 
Search instead for 
Did you mean: 

Record, Time data type

ivan_leonardo
Participant
0 Kudos

Hi,

I need to record a creation time on some table, and I have to add using UDF but it seems SAP only allow save time as numeric, for example 07:25:12AM I have to insert it to numeric field as 72512, I try using date/time field to save current_time but error.

Any tips or guide on working with time ?

And I need to save the time with 24hours format and 6digits such as 070520 (HHMMSS) not as 7520

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi Ivan,

In general B1 separates dates and times. A date field will only contain the date component. The time is usually stored in a smallint field.

When set the UDF up as type DATE/TIME and set the structure to HOUR, the field should be displayed according to your Windows locale, even though the value is an integer in the database.

Regards,

Johan

ivan_leonardo
Participant
0 Kudos

Hi Johan,

Yes it's solved, I create alphanumeric length 8 then use update query set "tes" = current_time and the result is 07:20:12. that's what i need

Rgds,

Answers (0)