UKismetMathLibrary::DateTimeMinValue
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the minimum representable FDateTime value, corresponding to January 1, year 1 at 00:00:00. Useful as a sentinel for 'unset' or 'beginning of time' date fields.
Caveats & Gotchas
- • The minimum value is year 1 AD, not year 0 — FDateTime has no concept of year 0 or BC dates. Subtracting any duration from the minimum overflows.
- • Default-constructed FDateTime() also equals the minimum value, so checking against DateTimeMinValue() is the idiomatic way to detect an uninitialized date.
Signature
static UE_INL_API FDateTime DateTimeMinValue( ); Return Type
FDateTime Example
Detect unset date field C++
FDateTime LastSeen; // default-constructed = min value
if (LastSeen == UKismetMathLibrary::DateTimeMinValue())
{
UE_LOG(LogTemp, Warning, TEXT("LastSeen has never been set."));
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?