Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Account for Grace Period in Date 1

Status
Not open for further replies.

smatthews

IS-IT--Management
Jul 27, 2001
108
US
Hello,

Our membership expires on 9/30, but there is a grace period until January. I am trying not to hardcode the date and just say:

paid_through date >=getdate()

so on October 1st these members will expire but they are actually still in the grace period. I can't seem to get the syntax correct using datepart... can anyone help?

Thanks!
 
You want a 2 month grace period?

If so, you could try....

Code:
Where paid_through_date >= DateAdd(Month, -2+DateDiff(Month,0,GetDate()), 0)

This will allow up to 2 months grace period. Using this code, the grace period will expire on the first day of the month that is Up To 2 months from the paid through date.

Make sense?

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Wow... Thanks gmmastros! works perfectly. Have a star... I just couldn't figure how to get around this.

smatthews
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top