CStr DateCString(secs, fmt);

Note This function was formerly called DateString.

Purpose

Returns a pointer to a string representing the date corresponding to secs seconds after 12:00 a.m., Friday, January 1, 1904, Universal Time [01-01-1904 00:00:00]. Date formats vary with your system configuration.

Parameters

Name Type Description
sec uInt32 Seconds since 12:00 a.m., Friday, January 1, 1904, Universal Time [01-01-1904 00:00:00].
fmt int32 Indicates the format of the returned date string, using the following values:
  • 0—Short date format, mm/dd/yy, where mm is a number between 1 and 12 representing the current month, dd is the current day of the month (1 through 31), and yy is the last two digits of the corresponding year. For example, 12/31/92.
  • 1—Long date format, dayName, MonthName, DayOfMonth, LongYear. For example, Thursday, December 31,1992.
  • 2—Abbreviated date format, AbbrevDayName, AbbrevMonthName, DayOfMonth, LongYear. For example, Thu, Dec 31,1992.

Return Value

The date as a C string.