Comparing two date fields in a web view

Hi all, wonder if you can help. I have two date fields which I am trying to compare.

txtStartDate_disp - Computed Date field which takes its date value from another field

txtToday - Editable field which takes it value from a nightly agent to calculate todays date.

The formula I am using is

SELECT Form=“frmConSafe” & txtStartDate_disp <= txtToday

When I compare the two values in the view, it doesn’t return all of the documents, only the ones that meet the criteria and have a start date this month. There are other documents that meet the criteria but were created the month before but they are not returned.

Any ideas? Kinda bashing my head on this one!

Subject: Comparing two date fields in a web view

Hey Lee

Sounds susopiciously like it may not be realising that it’s 2 dates its comparing. Does your agent put a date object or a string into the txtToday field? Easy way to check the type of data which is actually stored in the field - right click on the doc in the notes client and look at the field properties. If either is type text instead of date you can use @TextToTime on it in the view selection formula…

Hope this helps

Pete

Subject: RE: Comparing two date fields in a web view

Hey Pete, should just have IM’d you! ha ha!

Originally the problem was that the agent was puting in a time as well as the date. I sorted that and the values that they are returning are in the same format.

For some reason tho it returns all of the November dates as I wanted, but not the October. Its almost as if it doesn’t know the earlier dates exist or thinks they are greater.

I’m well confused!

Subject: RE: Comparing two date fields in a web view

HeHe - it’s a small world isn’t it!

I’m still thinking that it’s trying to compare two strings for some reason in which case e.g. 31/10/2006 would be greater than 13/11/2006 so wouldn’t show. U got any docs where the date is before 13/10/2006 if so do they show? If not can you create one just to prove that I’m talking complete nonsense :slight_smile:

If they do show the a combination of @Date and @TextToTime in the selection formula may help.

Subject: RE: Comparing two date fields in a web view

Thanks for all your help there Pete, working great now!