Sisk

Method

LogStream.EscapeSafeDateTime

Namespace
Sisk.Core.Http
Assembly
Sisk.Core.dll

EscapeSafeDateTime(DateTime, IFormatProvider?) #

Converts the specified DateTime to a file-name-safe string representation formatted as “yyyy-MM-dd_HH-mm-ss”.

C#
public static string EscapeSafeDateTime(DateTime dt, IFormatProvider? provider = null)

Parameters #

dt DateTime

The date and time to convert.

provider IFormatProvider?

An object that supplies culture-specific formatting information. Can be null.

Returns #

string

A string that is safe for use in file names.

Type to search the documentation and the API reference.