Question : part date + add to year

I have an introdate #01/04/2007#

I have now(0)

I would like to extract the current year from now(0)

I want to create a termination date

that is the same day and month as in introdate ie example here #01/04# and then add the remaining years using dateadd.

 CWTermDate = DateAdd("yyyy", RemainingLifeCycle, Now())

the problem is that now() takes todays day and month.






1:
2:
3:
4:
5:
LifeCycleExpired = DateDiff("YYYY", Now(), CWIntroDate)
     RemainingLifeCycle = LifeCycleExpired + 5
     datestart = CStr(Format("dd/mm", CWIntroDate))
     
     CWTermDate = DateAdd("yyyy", RemainingLifeCycle, Now())

Answer : part date + add to year

CWTermDate = DateValue(Day(Now()) & "/" & Month(Now()) & "/" & Year(Now()) + RemainingLifeCycle)
Random Solutions  
 
programming4us programming4us