D
Daniel M
I am having problems getting my vba to work properly with dates in the
variables.
I currently do a query to retrieve a value (variable1) which is in date/time
format in the table.
I then do a variable2 = dateadd("m",-3,date) to subtract 3 months off todays
date.
Finally i try to do a if variable1 <= variable2 then something but the
calculation doesnt seem to be working properly.
in the debugger i see var1 is date and time and var2 is only date. if i try
to use the formatdatetime function it shows var1 as "6/23/08" and var 2 as
3/3/9 without the quotes. In either case the output is not correct.
Any ideas on what i'm doing wrong? i'm sure its something silly with
formating or storing of the data. thanks.
variables.
I currently do a query to retrieve a value (variable1) which is in date/time
format in the table.
I then do a variable2 = dateadd("m",-3,date) to subtract 3 months off todays
date.
Finally i try to do a if variable1 <= variable2 then something but the
calculation doesnt seem to be working properly.
in the debugger i see var1 is date and time and var2 is only date. if i try
to use the formatdatetime function it shows var1 as "6/23/08" and var 2 as
3/3/9 without the quotes. In either case the output is not correct.
Any ideas on what i'm doing wrong? i'm sure its something silly with
formating or storing of the data. thanks.