VB6 date vs SQL Server date
-
To simplify date conversion i was adviced to use to integer converted dates i.s.o. the datetime type. Now i have the integer 37954 which resembles 01-12-2003 (dd-mm-yyyy) select cast(37954 as datetime) as startdate But VB6 thinks it is 29-11-2003 ?Format(37954, "dd-mm-yyyy") How is this possible? What am i doing wrong? Grtz, Guus
-
To simplify date conversion i was adviced to use to integer converted dates i.s.o. the datetime type. Now i have the integer 37954 which resembles 01-12-2003 (dd-mm-yyyy) select cast(37954 as datetime) as startdate But VB6 thinks it is 29-11-2003 ?Format(37954, "dd-mm-yyyy") How is this possible? What am i doing wrong? Grtz, Guus
-
To simplify date conversion i was adviced to use to integer converted dates i.s.o. the datetime type. Now i have the integer 37954 which resembles 01-12-2003 (dd-mm-yyyy) select cast(37954 as datetime) as startdate But VB6 thinks it is 29-11-2003 ?Format(37954, "dd-mm-yyyy") How is this possible? What am i doing wrong? Grtz, Guus
-
I don't have any Idea. Sorry but it seems awkward to use integers for dates. I think youd be better off using normal Date data. or I suggest ask the one who adviced you.:) Marvin N. Guerrero - Casting More!!
-
To simplify date conversion i was adviced to use to integer converted dates i.s.o. the datetime type. Now i have the integer 37954 which resembles 01-12-2003 (dd-mm-yyyy) select cast(37954 as datetime) as startdate But VB6 thinks it is 29-11-2003 ?Format(37954, "dd-mm-yyyy") How is this possible? What am i doing wrong? Grtz, Guus
Have you tried storing dates as strings? Easy to display in the format you want and easy to convert correctly to date/time format for any calculations that you need to perform on them. Just be sure to confirm the value is a valid date before storing (use isdate() function) Jon