os.date takes a string and inserts time values based on given formatStrings.
So it's first value should look something like this:
Today is %x, which is a %A, and the time is %X.
It will take the formatStrings (%x, %A, %X) present in that string and replace them with a time based upon what the second value is, that being your UNIX time. Our example UNIX time will be 906000490.
So the code should look like this:
os.date("Today is %x, which is a %A, and the time is %X.", 906000490)
Putting that into a print will print:
Today is 09/16/98, which is a Wednesday, and the time is 22:48:10.
So your code will have to look more like this:
if os.date(“%m”, os.time()) == 04 then
#Documentation
os.date
2 comments
Output error, And where's the error?
In the output error it says This is not Today's Date. It prints the else statement.