How To Manipulate Month Function of Date In Access
I am trying to create an update query in Access using the Month function of a date field and adding or subtracting months from it but start getting into problems where I am adding months and it takes me over 12.
With a renewal date in October month should evaluate to
UPDATE Subscription SET Subscription.sub_due = "R1"
WHERE (((Month([renewal_date])) Between [PubMonth]+3 And [PubMonth]+5) AND ((Subscription.discount) Not In (100,33)) AND ((Subscription.language)=[Wire Language]) AND ((Subscription.sub_type)="newsletter") AND ((Year([renewal_date]))>=Year(DateValue(Now()))));
10+3 ===> 1 Plus increment of Year by 1
10+5 ===> 3 Plus increment of year by 1
Can anyone suggest a way of doing this?
By CallMeAndy in forum Database
Last Post: 04-28-2005, 07:00 PM
By anonymous in forum VB Classic
Last Post: 12-08-2002, 01:34 AM
By Aaron Merry in forum C++
Last Post: 11-06-2001, 05:00 AM
By Jreg in forum VB Classic
Last Post: 05-25-2001, 02:57 PM
By erikcharles in forum Database
Last Post: 04-04-2001, 02:54 AM
Tags for this Thread
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center