Anh_Tran Posted April 4, 2003 Share Posted April 4, 2003 Dear All, I would like to know if we have a way to know what date is the latest date for each project. For example Project Date 1 2003-01-01 2 2003-10-01 1 2003-12-01 2 2003-11-01 So For Project 1, latest date is 2003-12-01 and for project 2, latest date is 2003-11-01. IS there a way to achieve this? Thanks All Anh Tran Link to comment Share on other sites More sharing options...
Lee Smith Posted April 4, 2003 Share Posted April 4, 2003 Are these dates in the same field? Will sorting by the date do what you want? Lee Link to comment Share on other sites More sharing options...
Anh_Tran Posted April 4, 2003 Author Share Posted April 4, 2003 YEs the date is the same field but when sorting you can see it but not shows up automatically for you Anh Phu Link to comment Share on other sites More sharing options...
Lee Smith Posted April 4, 2003 Share Posted April 4, 2003 And you won't unless you change your view from Form to Table View, or create a new layout as Columnar (List View). Lee Link to comment Share on other sites More sharing options...
BobWeaver Posted April 4, 2003 Share Posted April 4, 2003 You need to sort first by Project number and then by project date. Or, create a selfjoin relationship by Project, and then make a calculated field cLatestDate with the formula: Max(selfjoin::ProjectDate) Link to comment Share on other sites More sharing options...
Ugo DI LUCA Posted April 4, 2003 Share Posted April 4, 2003 Hi Bob, Is Max working with date fields ? Link to comment Share on other sites More sharing options...
BobWeaver Posted April 4, 2003 Share Posted April 4, 2003 It was the last time I checked. Link to comment Share on other sites More sharing options...
Ugo DI LUCA Posted April 4, 2003 Share Posted April 4, 2003 Oh yes. I've made a test. I don't know why I was almost sure Max was only returning numbers. Good to know. BTW, did somebody found a way Max(num with some text) would return num with some text. INV1520 ----->INV1520 Link to comment Share on other sites More sharing options...
BobWeaver Posted April 4, 2003 Share Posted April 4, 2003 If the text part is always the same then just do: "INV" & Max(sj::InvNo) The Max function should return the maximum of the numeric part, and then you just stick the "INV" onto the front again. Link to comment Share on other sites More sharing options...
Ugo DI LUCA Posted April 4, 2003 Share Posted April 4, 2003 Hi Bob, I had already tried this one (that was also your suggestion) but it doesn't seems to work for me ! Link to comment Share on other sites More sharing options...
BobWeaver Posted April 5, 2003 Share Posted April 5, 2003 You may have to use an intermediate calculated field cNumericPart = TextToNum(InvNo) Then use: "INV" & Max(sj::cNumericPart) Link to comment Share on other sites More sharing options...
Ugo DI LUCA Posted April 5, 2003 Share Posted April 5, 2003 I'll give it a try. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7852 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now