Skip to content

parseSecondFromDateTime

  • The core functions, which every industry uses.
parseSecondFromDateTime(value: string): string

Return the second (0-59) for a given ISO 8601 datetime string.

  • Returns zero-padded string for second.
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO datetime string

Second (00-59) or "" on invalid input

import { parseSecondFromDateTime } from "@northguild/gmt/plain/parse";
parseSecondFromDateTime("2024-03-15T14:30:45") // "45"
output 

plain/parse/parseSecondFromDateTime.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.