time.sqldate

Description

Returns a string representation of timestamp in the format 'YYYY-MM-DD'. If timestamp is not defined, the function will use the current local system date.

Syntax

string = sqldate([number timestamp])

ParameterDescription
timestamp The number of seconds since January 1, 1970 UTC (commonly called a UNIX timestamp).

Return Value

Returns a formatted date string in the format 'YYYY-MM-DD'.

Remarks

No remarks.

Examples

print(sqldate());

The above example will output something similar to: "2009-01-01"

print(sqldate(0)+" "+sqltime(0));

The above example will output something similar to (note the adjustment for local time): "1969-12-31 19:00:00"

See Also

time.sqltime()