I simply want to know how to get the dataTable[“min”] in this variable
local key = "Y:"..dateTable["year"].." M:"..dateTable["month"].." D:"..dateTable["day"].." H:"..dateTable["hour"].." I:"..dateTable["min"]
how would i do that
I simply want to know how to get the dataTable[“min”] in this variable
local key = "Y:"..dateTable["year"].." M:"..dateTable["month"].." D:"..dateTable["day"].." H:"..dateTable["hour"].." I:"..dateTable["min"]
how would i do that
Dunno what your dateTable is but you can use os.date()
local text = "Y:%Y M:%m D:%d H:%H I:%M"
local key = os.date(text, os.time())
I assume you would need to extract it from a string?
key:match('I:(%S+)')
would get the number after your I
: which I assume is the min
value you need.
You can play around with regular expressions here and experiment which patterns would suit you best next.