How to found latest date.
Hi,
I have list of usernames and Login Dates.
Here is small sample
Username - Login date
Andy - 21/11/17
Andy - 15/11/17
Andy - 10/10/17
Ben - 19/11/17
Ben - 14/11/17
Ben - 12/10/17
I want found rows when Andy's and Ben's last login in happen.
What is best way to found it?
I using Dataverse 3.1.4
Br: Kristian W
-
Kristian,
*** The following answer assumes you are on 3.1.6 ***
Take the above output and output it into an Aggregate node. Set the GroupBy to 'name' and the Operation to be Max of login and you should get what you want.
Note: This assumes your login field is a date, if it is not you will need to use the Data Analyzer to convert to a date before passing into the Aggregate node.
Regards, Tim.
-
Further to Tim's answer see the attached example data flow.
The example shows how the Aggregate node's max operator is used to find the latest date. Dataverse 3.1.6 is required as it provided the grid-based editor to simplify the configuration of the Aggregate node.
The example also shows how the formatted date string can be converted to a date type field using the Python strptime() operator, see here for details.
You will need Dataverse 3.1.6 to import the .lna file.
Attached files
-
You may also be interested in the 'Working with Untidy Date Values' post.
Please sign in to leave a comment.
Comments
3 comments