NWPackDateTime

Packs a date and time into an nuint32

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Service:Time/Date Manipulation

Syntax

  #include <nwmisc.h> 
  or 
  #include <nwcalls.h> 
   
  nuint32 N_API NWPackDateTime ( 
     const NW_DATE N_FAR  *sDate,  
     const NW_TIME N_FAR  *sTime);
  

Pascal Syntax

  #include <nwmisc.inc> 
   
  Procedure NWPackDateTime 
    (const sDate : pNW_DATE; 
     const sTime : pNW_TIME 
  ) : nuint32;
  

Parameters

sDate
(IN) Points to the NW_DATE structure (optional).
sTime
(IN) Points to the NW_TIME structure (optional).

Return Values

Returns the packed date and time upon successful completion.

Remarks

NWPackDateTime returns the packed date and time. If a parameter is NULL, the associated bits will be set to zero.

Many functions return dates in a packed format identical to that defined by DOS. Time occupies the low order word and date occupies the high order word. The bits are defined as follows:

  0-4     seconds divided by two 
  5-10    minutes 
  11-15   hours (0-23) 
  16-20   day 
  21-24   month 
  25-31   year minus 1980
  

NWPackDateTime does no validity checking on the passed information. The programmer should ensure dates and/or times in the associated structures are valid before passing them to NWPackDateTime.

See timedate.c for sample code.

See Also

NWPackDate, NWPackTime, NWUnpackDate, NWUnpackDateTime, NWUnpackTime