UKismetTextLibrary::AsDateTime_DateTime
#include "Kismet/KismetTextLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Converts a date & time to text combining both the date and time of day, using an invariant timezone with no conversion applied.
Caveats & Gotchas
- • No timezone conversion happens here — use AsTimeZoneDateTime_DateTime if the source value is UTC and needs converting to a display timezone.
- • InDateStyle and InTimeStyle are independent — you can mix a Short date with a Long time, which produces layouts that aren't always intuitive without testing in the target culture.
Signature
static FText AsDateTime_DateTime(const FDateTime& In, TEnumAsByte<EDateTimeStyle::Type> InDateStyle = EDateTimeStyle::Default, TEnumAsByte<EDateTimeStyle::Type> InTimeStyle = EDateTimeStyle::Default); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| In | const FDateTime& | The date and time to format. Used as-is, assumed already in the correct timezone. | — |
| InDateStyle | TEnumAsByte<EDateTimeStyle::Type> | Formatting style for the date portion. | EDateTimeStyle::Default |
| InTimeStyle | TEnumAsByte<EDateTimeStyle::Type> | Formatting style for the time portion. | EDateTimeStyle::Default |
Return Type
FText Example
Format a full date and time C++
FDateTime EventStart = FDateTime(2026, 12, 25, 18, 30, 0);
FText EventText = UKismetTextLibrary::AsDateTime_DateTime(EventStart, EDateTimeStyle::Medium, EDateTimeStyle::Short); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?