---
title: "CFDateFormatterGetAbsoluteTimeFromString(_:_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfdateformattergetabsolutetimefromstring(_:_:_:_:)"
---

# CFDateFormatterGetAbsoluteTimeFromString(_:_:_:_:)

Returns an absolute time object representing a given string.

## Declaration

```swift
func CFDateFormatterGetAbsoluteTimeFromString(_ formatter: CFDateFormatter!, _ string: CFString!, _ rangep: UnsafeMutablePointer<CFRange>!, _ atp: UnsafeMutablePointer<CFAbsoluteTime>!) -> Bool
```

## Parameters

- `formatter`: The date formatter object to use to parse string.
- `string`: The string that contains the time to be parsed.
- `rangep`: Reference to the range within the string specifying the substring to be parsed. If NULL, the whole string is parsed. On return, the range that defines the extent of the parse (may be less than the given range).
- `atp`: An absolute time value, returned by reference, that represents string. Ownership follows the https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1.

## Return Value

Return Value true if the string was parsed successfully, otherwise false.

## See Also

### Parsing Strings

- [CFDateFormatterCreateDateFromString(_:_:_:_:)](corefoundation/cfdateformattercreatedatefromstring(_:_:_:_:).md)
