Aller au contenu principal

DateTime():toISOString()

Returns the ISO 8601 formatted date string (e.g., "1970-01-01T00:00:00.000Z").

Signature

toISOString(): string

Returns

  • Type: string
  • The ISO 8601 formatted date string.

Examples

local now = DateTime()
local isoString = now:toISOString()
toast("ISO String: " .. isoString) -- e.g., "2024-01-15T10:30:00.000Z"