RealDocs

UKismetTextLibrary::AsDate_DateTime

function Engine Blueprint Since unknown
#include "Kismet/KismetTextLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Converts a date & time to text formatted as a date only, using an invariant timezone. The input is used as-is with no timezone conversion applied.

Caveats & Gotchas

  • No timezone conversion happens here — if InDateTime is a UTC value and you want it displayed in the local or a specific timezone, use AsTimeZoneDate_DateTime instead.
  • The InDateStyle options (Short/Medium/Long/Full) produce culture-specific date layouts, so 'Short' won't necessarily mean the same digit order across locales.
  • Only the date portion is rendered — any time-of-day information in InDateTime is discarded from the output.

Signature

static FText AsDate_DateTime(const FDateTime& InDateTime, TEnumAsByte<EDateTimeStyle::Type> InDateStyle = EDateTimeStyle::Default);

Parameters

Name Type Description Default
InDateTime const FDateTime& The date and time to format. Used as-is, assumed already in the correct timezone.
InDateStyle TEnumAsByte<EDateTimeStyle::Type> Formatting style: Default, Short, Medium, Long, or Full. EDateTimeStyle::Default

Return Type

FText

Example

Format a date for display C++
FDateTime EventDate = FDateTime(2026, 12, 25, 0, 0, 0);
FText DateText = UKismetTextLibrary::AsDate_DateTime(EventDate, EDateTimeStyle::Long);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.