# CreateTimeSpan()

Creates a timespan object that defines a time period.

The timespan object can be used with the **cachedWithin** attribute of [cffunction](../tags/function.md), [cfinclude](../tags/include.md), and [cfquery](../tags/query.md).

```
CreateTimeSpan( days=number, hours=number, minutes=number, seconds=number, milliseconds=number );
```

**Returns:** timespan

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| days | number | Yes | number of days in time period |  |
| hours | number | Yes | number of hours in time period |  |
| minutes | number | Yes | number of minutes in time period |  |
| seconds | number | Yes | number of seconds in time period |  |
| milliseconds | number | No | number of milliseconds in time period |  |

# Examples

```cfml
dump(createTimeSpan(0,0,30,0)); // 30-minute timespan
```







# Categories

[Date and time](../../categories/datetime.md)