RealDocs

UKismetTextLibrary::AsTimespan_Timespan

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

Description

Converts a passed-in time span to localized text, formatted as a time span (e.g. hours/minutes/seconds). Backs the 'As Timespan' Blueprint node.

Caveats & Gotchas

  • Unlike the date/time overloads, this function takes no formatting style parameter — the output format is fixed by ICU's duration formatter for the active culture.
  • The AdvancedDisplay meta on this UFUNCTION hides the pin in the compact node view even though there is only one parameter; it still appears if you expand advanced pins.

Signature

static FText AsTimespan_Timespan(const FTimespan& InTimespan);

Parameters

Name Type Description Default
InTimespan const FTimespan& The time span to format.

Return Type

FText

Example

Display an elapsed cooldown C++
FTimespan Elapsed = FTimespan::FromMinutes(90);
FText Display = UKismetTextLibrary::AsTimespan_Timespan(Elapsed); // "1 hr 30 min" (culture-dependent)

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.