|
-
April 9th, 1999, 12:27 AM
#1
How to convert COldDateTime to CTime
How can I convert COleDateTime object to CTime. I have another problem, please have a look at it.
These classes give date also but I need only day time, how can I disable the year,month in this class. I need to do so because i have to compare times irrespective of dates.
-
April 9th, 1999, 04:21 AM
#2
Re: How to convert COldDateTime to CTime
Why don't you just create a new object of class CTime and then retrieve the needed vars from COleDateTime and copy then in the new object. I do not think I understand correctly your question so please be more specific if you want more specific answers.
-
April 9th, 1999, 06:36 PM
#3
Re: How to convert COldDateTime to CTime
I want to do the following:
CTime t1, Const_Time1, Const_Time2;
if ((t1>Const_time1) && (t1<Const_time2))
{
// do something, thats what I want to do!
// ....
}
Now the follwing are my problems:
(1). How can I set the Const_Time1 & 2 to a particular time. I can only set it with its contructor but is there any other way.
(2) How to get t1 from user. I am using edit box and COleDateTime type to read, but then I need to convert it to CTime! If there is any other way please let me know. I want the user to give time in hr:min format.
(3) In time comparison, It also compares dates along with it(which is part of the Ctime structure). I don't want this because it can spoil my results as I need a purely time comparsion.
Please help me with these problems. It has taken quit time from me but I could not solved it yet. I will highly appreciate any help.
Shahzad
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|