Function

CFDateFormatterCreateStringWithDate

Returns a string representation of the given date using the specified date formatter.

Declaration

CFStringRef CFDateFormatterCreateStringWithDate(CFAllocatorRef allocator, CFDateFormatterRef formatter, CFDateRef date);

Parameters

alloc

The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

formatter

The date formatter object that specifies the format of the returned string.

date

The date object for which to create a string representation.

Return Value

A new string that represents date in the specified format. Returns NULL if there was a problem creating the object. Ownership follows the The Create Rule.

See Also

Creating Strings From Data

CFDateFormatterCreateStringWithAbsoluteTime

Returns a string representation of the given absolute time using the specified date formatter.

CFDateFormatterCreateDateFormatFromTemplate

Returns a localized date format string representing the given date format components arranged appropriately for the specified locale.