Regular expressions to the rescue!
Given:
You should be able to use:
Code:
local day, month, year, hour, minute = createdate():match("(\d+)\.(\d+)\.(\d+)\s+(\d+):(\d+)")
https://regex101.com/r/c4z5QM/1
(\d+) just means "find a section containing just digits and grab it for me. The bits in between specify the dots and spaces.
Note:
match returns them as strings, so you can use
tonumber(day), etc if you have to do math or compare them.