RealDocs

UKismetMathLibrary::DateTimeMaxValue

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

Description

Returns the maximum representable FDateTime value, which corresponds to December 31, 9999 23:59:59.9999999. Use it as a sentinel for 'no expiry' or 'forever' dates.

Caveats & Gotchas

  • Adding any positive duration to the max value overflows and wraps, producing an incorrect (very old) date. Always guard arithmetic near boundary values.
  • In Blueprint this node appears as 'Max Value (DateTime)' — searching for 'DateTimeMaxValue' in the Blueprint editor will not find it.

Signature

static UE_INL_API FDateTime DateTimeMaxValue( );

Return Type

FDateTime

Example

Initialise an expiry date to 'never' C++
FDateTime ExpiryDate = UKismetMathLibrary::DateTimeMaxValue();
// ExpiryDate now represents 9999-12-31 23:59:59 — use as a sentinel for no expiry

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.