f0f1f2.studio Template reference
English
Open application
Method

FormatLongTime

Definition

Namespace
Resto.Front.PrintTemplates.Cheques.Razor

Formats a time including seconds.

string TemplateBaseCore<T>.FormatLongTime(DateTime time)
Returns
string
Nullability
Not specified
Declared in
Resto.Front.PrintTemplates.Cheques.Razor.TemplateBaseCore<T>
Model purpose
Base class for RazorEngineCore print templates. Model contains the document data of type T. Provides formatting and markup output methods.

Parameters

DateTime time
Date/time value to format; its time zone is not converted.

Return value

A string formatted with the HH:mm:ss pattern.

Remarks

Uses CurrentCulture, including its calendar, month names and time separator. DateTime.Kind does not trigger UTC/local conversion. Components not present in the pattern are omitted, not rounded.

Example

// en-GB
FormatLongTime(new DateTime(2026, 9, 19, 14, 35, 42)); // "14:35:42"