Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Better date/time functions (for QM < 2.3.2)
#11
Thanks.

Macro Macro4
Code:
Copy      Help
str timeSpanStr="10m 15s"

ARRAY(str) a
tok timeSpanStr a
int h m s i j k
for i 0 a.len
,j=val(a[i] 0 k)
,sel a[i][k]
,,case 'h' h=j
,,case 'm' m=j
,,case 's' s=j

long ts=TimeSpanFromParts(0 h m s)
out ts
str t=TimeSpanToStr(ts)
out t


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)