Skip to content

Instantly share code, notes, and snippets.

@curioshiki
Created February 22, 2026 09:41
Show Gist options
  • Select an option

  • Save curioshiki/ed44522316e35f97b8a722570995d8f1 to your computer and use it in GitHub Desktop.

Select an option

Save curioshiki/ed44522316e35f97b8a722570995d8f1 to your computer and use it in GitHub Desktop.
Excel LAMBDA: UNIX Time & Serial Value Converters
UNIX_TO_EXCEL = LAMBDA(unix_val, [offset_hours],
LET(
os, IF(ISOMITTED(offset_hours), 9, offset_hours),
(unix_val / 86400) + 25569 + (os / 24)
)
);
EXCEL_TO_UNIX = LAMBDA(serial_val, [offset_hours],
LET(
os, IF(ISOMITTED(offset_hours), 9, offset_hours),
ROUND((serial_val - 25569 - (os / 24)) * 86400, 0)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment