Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date format and ...

Status
Not open for further replies.

WilliamGS

Programmer
Jan 21, 2004
54
PE
Hi all, please help me with:

1) I get the date format from Windows Control Panel with 'GetLocaleInfo()', these formats are:
dd/MM/yyyy
dddd, dd' de 'MMMM' de 'yyyy

But I have mi date in a COleDateTime object and COleDateTime::Format() does not work with these date formats, ¿How can I format my COleDateTime with dd/MM/yyyy and dddd, dd' de 'MMMM' de 'yyyy date formats?

2) Also, I have a CDateTimeCtrl and CDateTimeCtrl::SetFormat() works fine with dd/MM/yyyy and dddd, dd' de 'MMMM' de 'yyyy, but it does not work with COleDateTime date formats.

¿How can I format my COleDateTime and CDateTimeCtrl using both date format styles?

3) I have a COleVariant with VT_BSTR, when some function needs a text (const char*, LPCSTR, etc) I pass: myOleVariant->bstrVal
some functions work fine, in some functions the compiler stops and some functions only get the fisrt char, ¿How can I access to text value of the COleVariant correctly?

Thanks in advance,
William GS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top