Skip to content
MewixMewix

Unix timestamp

Use From = to-date to decode a number, or anything else to encode a parsed date as Unix seconds.

Updated by the Mewix team

Seconds, milliseconds, and the From field

Set From to to-date to decode field A as a Unix time. If the text in A has more than 10 characters, it is treated as milliseconds since the epoch; otherwise it is multiplied by 1000 and read as seconds. The result is an ISO-8601 string in UTC.

For any other From value, A should be a date-time string. The tool returns Math.floor(milliseconds / 1000) — whole seconds, not fractional.

Limits

Range follows your browser's Date implementation. There is no separate mode for microseconds or nanoseconds. Time zone offsets in A are interpreted by the parser, then floored to epoch seconds.

Questions

Why ten characters?

That is the heuristic baked into CalcTool: longer strings are assumed to already be in milliseconds.