View based on date created

I want view selection formula to select documents for a month from created date, then for documents between 7-12 months from creation date. Pls give me any help or start on this matter.

Subject: View based on date created

Take a look at the help for @adjust.

Subject: RE: View based on date created

yes I am using @adjust, but still got one doubt, for a view to show documents created older by 7 - 12 months, is this is right ?

curDate := @Date(CreatedDate);

tempDate1 := @Date(@Adjust(CreatedDate;0;7;0;0;0;0));

startDate := curDate < tempDate1;

tempDate2 := @Date(@Adjust(CreatedDate;0;12;0;0;0;0));

endDate := curDate < tempDate2;

SELECT (startDate & endDate)

thanks for the help

Subject: View based on date created

Can you be a little more clear about what it is you want this view to show you?

Look here

Subject: RE: View based on date created

hi,I cannot use agents, I must define a view selection formula. To display documents over by 12 months from the creation date

curDate := @Date(CreatedDate);

tempDate2 := @Date(@Adjust(CreatedDate;0;12;0;0;0;0));

SELECT (curDate >= tempDate2)

is this is correct ?

thanks for the help

Subject: RE: View based on date created

I don’t understand what this means:

documents over by 12 months from the creation date

what is ‘over’?

curDate := @Date(CreatedDate);

tempDate2 := @Date(@Adjust(CreatedDate;0;12;0;0;0;0));

SELECT (curDate >= tempDate2)

tempdate2 will always be > curDate, becuase its value is curDate plus 12 months. The resulting view will be empty. I don’t quite see what you are trying to do here.

Subject: View based on date created ?

hi,

I am just trying to make a view with only documents that’s is older than 7-12 months from the created date. I dont want a document older by six month from the created date in that view. like wise also need view with documents which is older than 12 months from created date. any help ? pls

thanks for the responses.

Subject: RE: View based on date created ?

I am just trying to make a view with only documents that’s is older than 7-12 months from the
created date.

It sounds like you want to compare the creation date to today’s date, and return @True for those documents where the difference is > x months and < y months. Right?

You should create a view selection formula with hard-coded dates, then update that formula with an agent once a day, as I describe here .

Set view = db.GetView(“a. Use this view to set docs as Expired”)

If Not view Is Nothing Then

Call dtx.setnow

Call dtx.AdjustYear(-1)

formula = "SELECT Form = ""XYZ""" &_

" & IsDraft != ""True""" &_

" & SomeField < [" & Format$(dtx.LSLocalTime,"mm/dd/yyyy") & "]" &_

" & !@IsAvailable(ACTION_DELETE)"

view.SelectionFormula = formula

End If

Subject: RE: View based on date created ?

hi

thank you very much for the solution, I will try this and let you know the results, since we cannot use much agent process I am also looking for some other solutions too.

thank you very much for your precious time spend on this issue.

gopi

Subject: View based on date created ? solution

hi,

just came up with solution, to make view selection with documets older by specific date

curDate := @Date(CreatedDate);

tempDate1 := @Date(@Adjust(@Date(@Now) ;0;0;-6;0;0;0));

startDate := curDate >= tempDate1;

tempDate2 := @Date(@Adjust(@Date(@Now);0;0;0;0;0;0));

endDate := curDate <= tempDate2;

SELECT startDate & endDate

pls check, any mistake pls inform back