---
title: "init(type:date:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkworkoutevent/init(type:date:)"
---

# init(type:date:)

Instantiates and returns a new workout event with the specified type and date.

## Declaration

```swift
convenience init(type: HKWorkoutEventType, date: Date)
```

## Parameters

- `type`: The type of workout event. For a description of possible events, see doc://com.apple.healthkit/documentation/HealthKit/HKWorkoutEventType.
- `date`: The time when the transition occurred. For a pause event, this date indicates the start of the break. For a resume event, this date indicates the end of the break. You must use a date between the starting and ending dates of the workout that you intend to modify.

## Return Value

Return Value A new workout event.

## See Also

### Deprecated

- [init(type:date:metadata:)](healthkit/hkworkoutevent/init(type:date:metadata:).md)
- [date](healthkit/hkworkoutevent/date.md)
