---
title: "xpc_date_create(_:)"
framework: xpc
role: symbol
role_heading: Function
path: "xpc/xpc_date_create(_:)"
---

# xpc_date_create(_:)

Creates an XPC date object.

## Declaration

```swift
func xpc_date_create(_ interval: Int64) -> xpc_object_t
```

## Parameters

- `interval`: The date interval which is to be boxed. Negative values indicate the number of nanoseconds before the epoch. Positive values indicate the number of nanoseconds after the epoch.

## Return Value

Return Value A new date object.

## See Also

### Date objects

- [xpc_date_create_from_current()](xpc/xpc_date_create_from_current().md)
- [xpc_date_get_value(_:)](xpc/xpc_date_get_value(_:).md)
