Datetime to Timestamp

local dt = {year=2013, month=12, day=25, hour=0, min=0, sec=0}
print(os.time(dt))

-- 1387900800

Timestamp to Datetime

local ts = os.time()
print(os.date('%Y-%m-%d %H:%M:%S', ts))

-- 2013-12-25 22:09:51

More: Date and Time