Share via


COleDateTimeSpan::SetDateTimeSpan

 

Sets the value of this date/time-span value.

Syntax

      void SetDateTimeSpan( 
   LONG lDays, 
   int nHours, 
   int nMins, 
   int nSecs  
) throw( );

Parameters

  • lDays, nHours, nMins, nSecs
    Indicate the date-span and time-span values to be copied into this COleDateTimeSpan object.

Remarks

For functions that query the value of a COleDateTimeSpan object, see the following member functions:

Example

COleDateTimeSpan spanOne;
COleDateTimeSpan spanTwo;
spanOne.SetDateTimeSpan(0, 2, 45, 0);  // 2 hours and 45 seconds
spanTwo.SetDateTimeSpan(0, 3, -15, 0); // 2 hours and 45 seconds   

Requirements

Header: atlcomtime.h

See Also

COleDateTimeSpan Class
Hierarchy Chart
COleDateTimeSpan::GetStatus
COleDateTimeSpan::m_span