>>The combination padl(alltrim(str(... seems a little too involved.
>>
>>I think you can use the simpler padl(int(Schedule.s_MM), 2, "0") - or even omit int() if the field is already an integer.
>>
>>>If time is 11:15 (s_HH = 9 and s_MM = 15), I get "200712121115"
>>>If time is 9:15 (s_HH = 9 and s_MM = 15), I get "20071212915"
>>>
>>>What I want when the time is 9:15 is "200712120915"
>>>
>>>If I add PADL to it like this:
>>>
>>>
>>> PADR(DTOS(s_Date) + PADL(ALLTRIM(STR(Schedule.s_HH * 100)), 2, '0') + ;
>>> PADL(ALLTRIM(STR(Schedule.s_MM)), 2, '0'), 30, ' ') AS Temp ;
>>>
>>>
>>>The result looks like this "200712129015"
>
>
padr(dtos(s_date)+transform(schedule.s_hh, "@L 99")+transform(schedule.s_mm, "@L 99"),30)
>
>
>I don't understand why were you multiplying hours with 100. Str(900) would be " 900", then allt() would give "900" and eventually padl("900",2,"0") gives "90". I simply prefer transform() with "@L" in the function part - old habit from 2.0.
That was brilliant! Exactly what I needed.
It's legacy code that I'm trying to fix.