var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: subtracting two Dates
I have a select statement in some Java code to access a Access table.
Each row in the table has a date timestamp.
I would like to fetch rows that are:
today - 1 month
today - 2 months.
My select statement looks something like this...
StringBuffer Itemsql =
new StringBuffer( "SELECT ID, " +
" NAME, " +
" UPC, " +
" PRICE " +
"FROM Item " +
"WHERE DateUsed > ( #Today# - #" + DateSince + "# ) ");
It's my understanding that dates must be preceded with a #, but I'm
getting a syntax error when I execute it.
Try to use the DATEADD function something like that
DateAdd("m", -1, yourDate) ' this will give you a date less than yourDate with one month
DateAdd("m", -2, yourDate) ' this will give you a date less than yourDate with two month