Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

COleDateTime

16 views
Skip to first unread message

Jeff Boeker

unread,
Mar 19, 2003, 3:28:03 PM3/19/03
to
I'm having some trouble with the COleDateTime Format()
returning a string with no length when it is 12:00:00 AM.

Here's a code snippet that reproduces the problem:

COleDateTime time;
CString strTime;

time.m_dt = 37688.999996701386;
strTime = time.Format(VAR_TIMEVALUEONLY);

Stepping into the Format(), I see that VarBstrFromDate
doesn't fail (hr = S_OK), it just doesn't set the bstr to
anything.

Any ideas?

Thanks,

Jeff Boeker

Yan-Hong Huang[MSFT]

unread,
Mar 20, 2003, 2:12:17 AM3/20/03
to
Hi Jeff,

I did repro it on my side. I will report it to our dev team. For now, I
think you need to use time.Format() to get the setting when you get the
empty string.

Thanks very much for your feedback.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Jeff Boeker" <JBo...@aibt-inc.com>
!Sender: "Jeff Boeker" <JBo...@aibt-inc.com>
!Subject: COleDateTime
!Date: Wed, 19 Mar 2003 12:28:03 -0800
!Lines: 20
!Message-ID: <1e5a01c2ee56$0b0b8e20$3301...@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcLuVgsLLl3jfUvLQo+dw6dE8Xsskg==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.languages.vc
!NNTP-Posting-Host: TK2MSFTNGXA02 10.40.1.51
!Path: cpmsftngxa08.phx.gbl!cpmsftngxa06
!Xref: cpmsftngxa08.phx.gbl microsoft.public.dotnet.languages.vc:21283
!X-Tomcat-NG: microsoft.public.dotnet.languages.vc
!
!I'm having some trouble with the COleDateTime Format()
!returning a string with no length when it is 12:00:00 AM.
!
!Here's a code snippet that reproduces the problem:
!
!COleDateTime time;
!CString strTime;
!
!time.m_dt = 37688.999996701386;
!strTime = time.Format(VAR_TIMEVALUEONLY);
!
!Stepping into the Format(), I see that VarBstrFromDate
!doesn't fail (hr = S_OK), it just doesn't set the bstr to
!anything.
!
!Any ideas?
!
!Thanks,
!
!Jeff Boeker
!

0 new messages