Wide-Character Date and Time Manipulation

Convert time and date to wide character strings.

  #include <wchar.h> 
  size_t wcsftime(wchar_t * str, size_t max_size, const wchar_t * format_str, const struct tm * timeptr); 
  wchar_t * wctime(const time_t * timer);   

These functions operate identically to their counterpart functions in stdio.h. But instead of operating on character strings, these functions operate on wide character strings.

The table below matches these wide character functions to their equivalent char-based functions in stdio.h.
Table 1. Wide Character Date and Time Functions
Function Wide Character Equivalent
wcsftime() csftime()
wctime() ctime()