NWLstrftime

Formats the time and date according to a specified format

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Internationalization

Syntax

  #include <time.h> 
  #include <stdio.h> or #define NWL_EXCLUDE_FILE 
  #include <nwlocale.h> 
   
  N_EXTERN_LIBRARY(size_t) NWLstrftime  ( 
     pnstr                  dst,  
     size_t                 max,  
     const nstr N_FAR      *fmt,  
     const struct tm N_FAR  *ptm); 
  
  

Pascal Syntax

  uses netwin32 
   
  Function NWLstrftime 
     (dst : pnstr; 
     max : size_t; 
     const fmt : nstr; 
     const ptm : struct [tm] 
  ) : size_t; 
  
  

Parameters

dst
(OUT) Points to the buffer to contain date and time (if the string parameter is NULL, the length of the time string is returned).
max
(IN) Specifies the maximum size of the buffer where the date and time string is placed.
fmt
(IN) Points to the specified format.
ptm
(IN) Points to the tm structure.

Return Values

0x0000

The max parameter is 0 or the fmt parameter is NULL

non-zero

Length of formatted time

Remarks

NWLstrftime places characters into the dst parameter as formatted by the fmt parameter.

The fmt parameter can have the following values:

Value

Effect

%c

Date and time representation appropriate for locale ("2/22/97 04:30:00 pm" for USA locale)

%x

Date representation for current locale ("02/22/97" for USA locale)

%X

Time representation for current locale; may be in 12-hour format according to locales format ("04:30:00 pm" for USA locale)

If the dst parameter is set to NULL, the length of the formatted string is still returned. The formatted string is not returned.

See Also

NWLsetlocale