-
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.
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()))));
With a renewal date in October month should evaluate to
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?
Thanks.
Talat
Similar Threads
-
By CallMeAndy in forum Database
Replies: 5
Last Post: 04-28-2005, 07:00 PM
-
By anonymous in forum VB Classic
Replies: 1
Last Post: 12-08-2002, 01:34 AM
-
By Aaron Merry in forum C++
Replies: 0
Last Post: 11-06-2001, 05:00 AM
-
By Jreg in forum VB Classic
Replies: 2
Last Post: 05-25-2001, 02:57 PM
-
By erikcharles in forum Database
Replies: 3
Last Post: 04-04-2001, 02:54 AM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|