cancel
Showing results for 
Search instead for 
Did you mean: 

How to use MAX() function with date field

Former Member
0 Kudos

Hi Frzz,

I have created a Graphical calculation view in which i have multiple records for each employee with different dates. But my requirement is to take the records which have maximum date.

I have converted the date into Integer and applied the MAX() function. But still am getting multiple records.

Is there is any other way we can achieve this requirement in Graphical Calculation view??  Your suggestion will really help me.



Thank  you.

Krishna.

View Entire Topic
Former Member
0 Kudos

Actually i have aggregated the date field with MAX after converting it into integer.

Former Member
0 Kudos

Date values are like

20140101

20140102

20140103

20140104

former_member182302
Active Contributor
0 Kudos

Have an aggregation node and keep only date as the column and use max for it. And then try to join this aggregation node with your result table.

Then it will give the records with max date only.

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Krishna,

Thanks for the update.

If i use aggregation node and use max for the Date filed, In this case which fieds act as the Group By claue?? All the remaining fileds are under Group By Clause???

Best Regards,

Krishna.

former_member182302
Active Contributor
0 Kudos

Hi Krishna,

Only add DATE filed add it as "Aggregated column" and use MAX for it.

It will frame a query something similar to this: SELECT MAX(DATE) FROM TABLE

Regards,

Krishna Tangudu

Former Member
0 Kudos

Thanks a lot krishna.

Its working.

Former Member
0 Kudos

can you please elaborate?