Strftime
strftime is a date-and-time formatting function or method that converts a temporal value into a string according to formatting directives.
Modern C, Third Edition
strftime is a C standard-library function that formats a broken-down time into a caller-provided character array according to a format string.
- How it is used
- Formats broken-down calendar times into caller-controlled textual representations.
- How deep it goes
- Defines the interface and catalogs format codes, but defers locale access and setting to another treatment.
- Examples
- Uses format strings containing %F, locale-sensitive date and time codes, and the strftime declaration.
- What you can do after
- Apply strftime to compose textual presentations of values held in struct tm.
Modern C
strftime is a C standard library function that formats a broken-down time into a character string according to date-and-time conversion specifications.
- How it is used
- Formats broken-down calendar times into composed textual representations.
- How deep it goes
- Defines the interface and conversion families, while deferring pointer rationale and locale access.
- Examples
- Uses the function declaration and a reference table of date, time, locale, and ISO 8601 conversion specifications.
- What you can do after
- Apply strftime to compose date-and-time strings from struct tm values and conversion specifications.
Related concepts
- format stringuses · A format string is a character sequence containing literal text and directives that specify how supplied values are represented in formatted input or output.
- date formatused by · A date format is a convention or specification for representing and ordering the components of dates and, where applicable, times.
- Timeuses · Time is Ruby's built-in class for representing, manipulating, and formatting times and dates.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

