FDateTime::ToFormattedString

Returns the string representation of this date.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/DateTime.h

Include

#include "Misc/DateTime.h"

Source

/Engine/Source/Runtime/Core/Private/Misc/DateTime.cpp

Syntax

FString ToFormattedString
(
    const TCHAR * Format
) const

Remarks

Returns the string representation of this date.

Uses strftime-like syntax: a - Weekday, eg) Sun A - Weekday, eg) Sunday w - Weekday, 0-6 (Sunday is 0) y - Year, YY Y - Year, YYYY b - Month, eg) Jan B - Month, eg) January m - Month, 01-12 d - Day, 01-31 e - Day, 1-31 l - 12h Hour, 1-12 I - 12h Hour, 01-12 H - 24h Hour, 00-23 M - Minute, 00-59 S - Second, 00-60 p - AM or PM P - am or PM j - Day of the Year, 001-366

Returns

String representation.

Parameters

Parameter

Description

Format

The format of the returned string.