Post

3 followers Follow
0
Avatar

Date subract

Hi, 

 

I want some date fields to read backwards off a set date field and I can't seem to get the function to work for me. For example, I want Field A to be equal to Field B minus one week but all I get is a blank field or an error. I'm currently using Dateaddcalendarfixedperiod. Any idead?

Deirdre O'Donnell Answered

Please sign in to leave a comment.

2 comments

1
Avatar

Hi Dee,

 

If you consider "MyDate" as your initial date, you can use the syntax: DateAdd(MyDate, -Weeks(1, True))

Test if this fits your needs.

Armand

Armand BOLMONT 1 vote
0
Avatar

Hello Dee,

I have tested the solution Armand suggested and it seems to work. Could you please confirm?

Thank you!

Roland Pumputis 0 votes