msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question on converting date values created using ealier vers

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions
Author Message
DanMH



Joined: 04 Oct 2007
Posts: 46

PostPosted: Tue Feb 26, 2008 8:35 am    Post subject: Question on converting date values created using ealier vers Reply with quote

I am trying to read date values that were serialized to a data file as a DOUBLE
in VB3.

Now, when I try to read the serialized DOUBLE value using VB6, I am not getting
the results that I expect. I am trying to load the double value into
Format$(nDbl, "mmm d yyyy"). The result always returns 12/30/1899.

Was there a change in how date values are stored between Win16/VB3 and
Win32/VB6?

Thanks in advance,
DanMH

Archived from group: microsoft>public>vb>general>discussion
Back to top
View user's profile Send private message
Norm Cook



Joined: 13 Feb 2008
Posts: 3

PostPosted: Tue Feb 26, 2008 12:02 pm    Post subject: Re: Question on converting date values created using ealier Reply with quote

"DanMH" wrote in message @TK2MSFTNGP06.phx.gbl...
>I am trying to read date values that were serialized to a data file as a
>DOUBLE
> in VB3.
>
> Now, when I try to read the serialized DOUBLE value using VB6, I am not
> getting
> the results that I expect. I am trying to load the double value into
> Format$(nDbl, "mmm d yyyy"). The result always returns 12/30/1899.
>
> Was there a change in how date values are stored between Win16/VB3 and
> Win32/VB6?
>
> Thanks in advance,
> DanMH

--Format$(nDbl, "mmm d yyyy"). The result always returns 12/30/1899.

Perhaps you need to inspect the value of nDbl since that date
is always returned when nDbl = 0.
Back to top
View user's profile Send private message
DanMH



Joined: 04 Oct 2007
Posts: 46

PostPosted: Tue Feb 26, 2008 9:33 am    Post subject: Re: Question on converting date values created using ealier Reply with quote

Never mind...!!

Problem found... conversion problem with Unicode.

It appears that I called for help while I was drowning,
and as I hit the bottom, I found a way to walk to shore..!!

My routine was taking a string, converting it to an array of bytes,
and I was reading the 'unicode' version which didn't line up
boundary wise to the double...

DanMH




"DanMH" wrote in message@TK2MSFTNGP06.phx.gbl...
> I am trying to read date values that were serialized to a data file as a
DOUBLE
> in VB3.
>
> Now, when I try to read the serialized DOUBLE value using VB6, I am not
getting
> the results that I expect. I am trying to load the double value into
> Format$(nDbl, "mmm d yyyy"). The result always returns 12/30/1899.
>
> Was there a change in how date values are stored between Win16/VB3 and
> Win32/VB6?
>
> Thanks in advance,
> DanMH
>
Back to top
View user's profile Send private message
christery



Joined: 11 Jan 2008
Posts: 71

PostPosted: Wed Feb 27, 2008 11:41 pm    Post subject: Re: Question on converting date values created using ealier Reply with quote

> > the results that I expect.  I am trying to load the double value into
> > Format$(nDbl, "mmm d yyyy"). The result always returns 12/30/1899.
>

That would be when Gates family made i to USA...

>It appears that I called for help while I was drowning,
>and as I hit the bottom, I found a way to walk to shore..!!

DOS/BIOS goes (did anyway) somwhere like BG:s MS birthyear when
loosing battery... the 80:s (QDOS? I Think)

So dont do your ancesters birthyears in excel, vb becuase they might
be a bit off... but recent versions might have fixed that... what do I
know...
worked with the 2000 "bug" at our company, no we are struggeling with
the 10000 bug *smile*

//CY

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB General Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group