os.date

Returns a formatted date and time string. It will format the current time, unless you pass a Unix timestamp (in seconds) as the second argument.

os.date
Function
Syntax
os.date(
  • format : string
  • unixtime? : number
)

Returns string text
API os
Source CC:Tweaked

Template:To do

{

ExamplePrint time and date
Prints the current time and date.
Code
<nowiki>
print(os.date("%d.%m.%Y %H:%M"))
    </nowiki>
Output
13.02.2020 18:00
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.