---
title: "CFDateCreate(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfdatecreate(_:_:)"
---

# CFDateCreate(_:_:)

Creates a CFDate object given an absolute time.

## Declaration

```swift
func CFDateCreate(_ allocator: CFAllocator!, _ at: CFAbsoluteTime) -> CFDate!
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new object. Pass NULL or doc://com.apple.corefoundation/documentation/CoreFoundation/kCFAllocatorDefault to use the current default allocator.
- `at`: The absolute time to convert to a CFDate object.

## Return Value

Return Value A date object that represents the absolute time at.  The caller is responsible for releasing the CFDate object using CFRelease.

## Discussion

Discussion CFDate objects must always be created using absolute time. Time intervals are not supported.

## See Also

### CFDate Miscellaneous Functions

- [CFDateCompare(_:_:_:)](corefoundation/cfdatecompare(_:_:_:).md)
- [CFDateGetAbsoluteTime(_:)](corefoundation/cfdategetabsolutetime(_:).md)
- [CFDateGetTimeIntervalSinceDate(_:_:)](corefoundation/cfdategettimeintervalsincedate(_:_:).md)
- [CFDateGetTypeID()](corefoundation/cfdategettypeid().md)
