current date time 
Author Message
 current date time

I am using ATL 2.0 how I can get current date time in DATE or VARIANT
format.


Tue, 30 Mar 2004 17:57:17 GMT  
 current date time

Quote:
>I am using ATL 2.0 how I can get current date time in DATE or VARIANT
>format.

Try COleDateTime::GetCurrentTime

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Wed, 31 Mar 2004 03:11:46 GMT  
 current date time
I'm not using MFC. I am using ATL COM. Is any way to get current date in
variant type

Quote:
> >I am using ATL 2.0 how I can get current date time in DATE or VARIANT
> >format.

> Try COleDateTime::GetCurrentTime

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.



Fri, 02 Apr 2004 10:22:05 GMT  
 current date time

Quote:
>I'm not using MFC. I am using ATL COM. Is any way to get current date in
>variant type

I think COleDateTime is effectively stand-alone, and can be used
anywhere. If you don't want to do that, have a look at its
implementation in the MFC source code and duplicate that.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Fri, 02 Apr 2004 14:32:44 GMT  
 current date time

Quote:

> I am using ATL 2.0 how I can get current date time in DATE or VARIANT
> format.

CComVariant val;
val.ChangeType(VT_DATE);

SYSTEMTIME st={0};
VariantTimeToSystemTime(val.date,&st);

char month[50];
char year[50];

wsprintf(month, "%u", st.wMonth);
wsprintf(year, "%u", st.wYear);



Sat, 03 Apr 2004 03:56:55 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Getting the current date/time

2. current date/time format question ????

3. help-get current date using time.h

4. Touching a file (set to current time and date)

5. Question about Get Server Current Date and time, thank you

6. Displaying the current time and date in a dialog using COleDateTime

7. Get current time and date form an Server

8. C time/date to Visual Basic time/date

9. Date Time Picker - Date AND Time

10. date function for returning the current date.

11. Display Current Date in a bound Date field

12. Calculating remaing time from totaltime and current time

 

 
Powered by phpBB® Forum Software