cancel
Showing results for 
Search instead for 
Did you mean: 

crystal reports convert number to time value

former_member319241
Participant
0 Kudos
4,452

Hi,

I have a field which is stored in numeric format for time.

The field can be 3 or 4 digits field.

I want to display this fields as the time field.

For example,

900    9:00 AM

1000  10:00 AM

1600  16:00 AM

Please reply.Thanks.

View Entire Topic
siwantham
Discoverer
0 Kudos

Hi, You can also use this formula to convert the time to a 24-hour format. Please replace the table name and field name with the appropriate values for your specific data.

Left(Replace(ToText({ORCT.DocTime}, 0), ",", ""), Length(ToText({ORCT.DocTime}, 0)) - 3) +':' + Right(ToText({ORCT.DocTime},0),2)

Original Value 14,33.00

Converted value 14:33

 

Thank you

Siwantha Matarage