Skip to content

Modern Chrono Instant ToString

Paul Squires edited this page Oct 24, 2026 · 6 revisions

Home › Date and Time (Chrono) › Chrono Date and Time › Instant.ToString

Instant.ToString

Returns ISO 8601 text, or the date-time laid out by a pattern such as "yyyy-MM-dd".

Syntax

Instant.ToString
Instant.ToString( pattern )

Examples

#import "std/chrono"
using chrono

dim as DateTime d = DateTime( 2026, 8, 13, 14, 30, 5, 123 )
print d.ToString( )          '' 2026-08-13T14:30:05.1230000

'' The no-argument form is ToIsoString, a ustring. The one-argument form
'' takes a PATTERN and returns text of the pattern's type.
print d.ToString( "yyyy-MM-dd" )         '' 2026-08-13
print d.ToString( "HH:mm:ss" )           '' 14:30:05

Library: Chrono Date and Time
Category: Date and Time (Chrono)
Documented under: The Members

Clone this wiki locally