Bug:When Converting date 
Author Message
 Bug:When Converting date

i using vb6 on win2k.
when i convert double to date or date to double i have a
offset of 2 day.

ex:cdbl("1/1/1900") = 2 instead 0
or cdate(0) = "00:00:00"

can somebody help???



Mon, 06 Sep 2004 17:31:27 GMT  
 Bug:When Converting date

21 Mar 2002 01:31:27 -0800 bearing the following fruit:

Quote:
>i using vb6 on win2k.
>when i convert double to date or date to double i have a
>offset of 2 day.

>ex:cdbl("1/1/1900") = 2 instead 0

The correct value for cdbl("1/1/1900") *IS* 2
dates start from 30-12-1899 NOT 1-1-1900.


Mon, 06 Sep 2004 21:11:57 GMT  
 Bug:When Converting date
ok, sql date convert and vb date convert begin from
different date cause,when
i ""cast('1-1-1900',numeric) = 0"" with sql,my result is 0

what u said is that sql dates start from  1-1-1900
and vb date start from 30-12-1899 ?

Quote:
>-----Original Message-----

Thu,
>21 Mar 2002 01:31:27 -0800 bearing the following fruit:

>>i using vb6 on win2k.
>>when i convert double to date or date to double i have a
>>offset of 2 day.

>>ex:cdbl("1/1/1900") = 2 instead 0

>The correct value for cdbl("1/1/1900") *IS* 2
>dates start from 30-12-1899 NOT 1-1-1900.

>.



Tue, 07 Sep 2004 01:25:44 GMT  
 Bug:When Converting date
If you really want to be confused.  Dates in Excel for Windows and Excel for
the Mac both use different start dates. Makes writing cross platform
spreadsheets real fun.

Matt


Quote:
> ok, sql date convert and vb date convert begin from
> different date cause,when
> i ""cast('1-1-1900',numeric) = 0"" with sql,my result is 0

> what u said is that sql dates start from  1-1-1900
> and vb date start from 30-12-1899 ?

> >-----Original Message-----

> Thu,
> >21 Mar 2002 01:31:27 -0800 bearing the following fruit:

> >>i using vb6 on win2k.
> >>when i convert double to date or date to double i have a
> >>offset of 2 day.

> >>ex:cdbl("1/1/1900") = 2 instead 0

> >The correct value for cdbl("1/1/1900") *IS* 2
> >dates start from 30-12-1899 NOT 1-1-1900.

> >.



Tue, 07 Sep 2004 22:29:50 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Converting Julian Date to Long Date

2. Code to Convert Medium Date to Short Date

3. Function to convert date() to Julian date

4. How to convert 4 byte date to 8 byte date

5. Convert date serial to a date data type

6. searching a routine to convert date number in normal format date

7. How to convert DATE to JULIAN DATE?

8. How to convert DATE to JULIAN DATE?

9. Converting Julian dates to Calender dates.

10. convert Full date from minutes to normal date format

11. Convert date to short date in formula editor

12. Converting %date% %time% to VB Time/Date

 

 
Powered by phpBB® Forum Software