Skip to main content

JDE Time

Hi I have a JDE 6 digits time field li 183005. It should be 18:30:05.
Is there a function to convert it?

Thanks

Brian Element Wed, 11/04/2020 - 15:07
Is this a text or numeric field? If it is numeric turn it into a string then you can use the @left, @mid and @right to extract the time, so something like this should work:

@left(@Str(183005, 6, 0), 2) + ":" + @mid(@Str(183005, 6, 0), 3, 2) + ":" + @right(@Str(183005, 6, 0), 2)

I think that should work but I haven't actually tested it so it might need a bit of an adjustment.

VITOPIEPOLI Thu, 11/05/2020 - 05:18

In reply to by Brian Element

Thank you very much Brian,
it needed to be wrapped within @Ctot function to work.
@Ctot(@Left(@Str(TIME_UPDATED,6,0),2) + ":"+ @Mid(@Str(TIME_UPDATED,6,0),3,2)+":"+@Right(@Str(TIME_UPDATED,6,0),2),"HH:MM:SS")