This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

character string
#2
(08.10.2022, 09:38)Chris Wrote: Hello,

I want to cut part of a value : 


-- value1 --> 11:36:23, Samedi

I want to recover the first part - hour without the day

-- 11:36:23

Thanks.
Hi,
this could work

local value1 = '11:36:23, Samedi'
local data = '%d%d:%d%d:%d%d'
local res = string.match(value1, data)
log(res)
Reply


Messages In This Thread
character string - by Chris - 08.10.2022, 09:38
RE: character string - by CristianAgata - 09.10.2022, 08:00
RE: character string - by Chris - 09.10.2022, 11:03
RE: character string - by CristianAgata - 09.10.2022, 13:52
RE: character string - by Dré - 09.10.2022, 13:42
RE: character string - by Chris - 09.10.2022, 14:06
RE: character string - by CristianAgata - 09.10.2022, 14:27
RE: character string - by Dré - 09.10.2022, 14:39
RE: character string - by Chris - 09.10.2022, 14:56
RE: character string - by admin - 10.10.2022, 06:25

Forum Jump: