Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
i have this values
NUMBER
250 07:03
670 09:30
28 15:01
if i use
left(NUMBER,3)
mid(NUMBER, 5,2)
result is
left
250
670
28
mid
07
09
5 (error)
How could I extract the 3 (left) characters having a dynamic field ?
Maybe something like :
SubField('28 15:01',' ',1)
and
SubField(subfield('28 15:01',' ',2),':')
There are different Ways
You can split the String (may on blank or colon) as Bill Markham has recommeded to you
you can also use right instead of the left statement, if you want to select the time
hi,
not all time but only hh (15)
28 15:01
I need to calculate how many hours are 28 days + 15 hours
The final result should be 28*24 + 15 = 687
Bill Markham's way will work
num(SubField($(TextVar),' ',1))*24 + num(SubField(SubField($(TextVar)' ',2),':',1))
Bonjour,
maybe:
left(right(NUMBER,5),2) AS hour