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.

Stucturing data
#9
This will add a "datetime" key to each table element. You can change the format string as needed. See this for possible formats: https://man7.org/linux/man-pages/man3/strftime.3.html
Code:
for _, entry in ipairs(spot) do
  entry.datetime = os.date('%c', entry.time)
end
Reply


Messages In This Thread
Stucturing data - by tomnord - 31.10.2022, 14:32
RE: Stucturing data - by admin - 31.10.2022, 14:36
RE: Stucturing data - by tomnord - 31.10.2022, 14:51
RE: Stucturing data - by admin - 31.10.2022, 14:56
RE: Stucturing data - by tomnord - 31.10.2022, 20:52
RE: Stucturing data - by admin - 01.11.2022, 08:48
RE: Stucturing data - by tomnord - 01.11.2022, 10:34
RE: Stucturing data - by tomnord - 01.11.2022, 13:23
RE: Stucturing data - by admin - 01.11.2022, 13:44
RE: Stucturing data - by tomnord - 01.11.2022, 14:02
RE: Stucturing data - by admin - 01.11.2022, 14:05

Forum Jump: