MySQL Forums
Forum List  »  Microsoft Access

Access DateDiff Equivalent
Posted by: Andy Hughes
Date: October 26, 2009 08:58AM

Hi All....
I'm in the process of migrating our Access DB to MySQL 5 - I'm not sure if i'm doing this right, but i've been copying my Access Queries and creating 'Views' In MySQL. This seems to be working ok, but i'd like some confirmation on this.
Also, I'm getting an error on one of my queries. Please see code below:
I think it has to do with the DateDiff, but i'm not sure.
Thanks in advance
Andy
----
SELECT Vouchers.VoucherID, Vouchers.VoucherCode, Vouchers.StartDate, Vouchers.EndDate, Vouchers.Discount, Vouchers.VoucherTypeID
FROM Vouchers
WHERE (((DateDiff('d',[StartDate],Date()))>=0) AND ((DateDiff('d',[EndDate],Date()))<=0));

Options: ReplyQuote


Subject
Views
Written By
Posted
Access DateDiff Equivalent
4650
October 26, 2009 08:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.