I started to think that if I could convert the COleDateTime to a DATE
which it does say you can do I figured I could just add 7 or 5 or
whatever number of days that I wanted to add and then create a new
COleDateTime member with the new DATE.
However I have not figured out how to use this function of the class
Here it is from the help files ......
operator DATE( ) const;
Remarks
This operator returns a DATE object whose value is copied from this
COleDateTime object.
For more information about the implementation of the DATE object, see
the article Date and Time: OLE Automation Support in Programming with
MFC.
I am familiar with overriding operator = type stuff but not this one
yet
send mail to msm...@tiac.net
thanks
msm...@tiac.net wrote in article <5kg887$n...@news-central.tiac.net>...
Use a COleDateTimeSpan (subtract req'd date from today's date) and use its
GetDays() function.
HTH
Harley
COleDateTime t, * pNew;
...
pNew = new COleDateTime( (DATE)t + 5 );
>
.......
> However I have not figured out how to use this function of the class
> Here it is from the help files ......
>
> operator DATE( ) const;
........
> I am familiar with overriding operator = type stuff but not this one
> yet
>
> send mail to msm...@tiac.net
This is the cast operator. You can override the cast to
get diffent types. This is an example:
COleDateTime hour;
DATE d_hour=(DATE)hour; // in this line you are using the cast operator