# FormatDateTimeString

int FormatDateTimeString (double dateTime, const char formatString[], char outputBuffer[], int bufferSize);

## Purpose

Formats a given date/time into a string buffer according to descriptions in the formatString parameter.

FormatDateTimeString supports the same absolute date/time format specifiers as the strftime function with the %nf extension.

## Parameters

Input
Name | Type | Description
DateTime | double-precision | The date/time to format. The value is the number of seconds since midnight, January 1, 1900. You can call MakeDateTime to retrieve a specified time in this format, or you can call GetCurrentDateTime to retrieve the current date/time.
formatString | string | The format string that specifies how to convert the date/time for output. The formatString is similar to the format string used in printf. The formatString supports the same absolute date/time format specifiers as the strftime function with the %nf extension.
bufferSize | integer | The maximum number of characters, including a terminating NUL character, to be written into outputBuffer.
Output
Name | Type | Description
outputBuffer | string | The destination buffer for the formatted output.

## Return Value

Name | Type | Description
status | integer | Returns the size of the buffer required to hold the entire formatted string, not including the terminating NUL byte. A negative number indicates that an error occurred.