Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement to take the first date from the date field.,
ie.,
Date
20101101
20101105
20101107
20101109
20101111
20101121
20101131 .,
Min(Date) gives us the date "20101101".
How can i take the next date ie., "20101105"
If i go with Min(Date)+1 it gives me 20101102 ie., next date in the calendar., but i want to pick the next from the date field.
Please advise.
Thanks,
Swathi
Min(Date, 2) // 2 indicates rank of min, i.e. - second minimum here.
Thank you..
But the real problem is it is in the integer format. it's working fine once after changing into Date.
Yes you have to change it to date format.
As Min, Max , avg etc functions return numeric values.
Min(Date#(Date,'YYYYMMDD'), 2)
Hi Swathi,
Change the date field into date format like this
LOAD
'
'
'
'
Date(Date#(DateFieldName, 'YYYYMMDD')) AS FormattedDate
FROM DataSource;
Now use this expression
=Min(FormattedDate, 2)
Regards,
Jagan.
Hi Swathiji,
Select min(date) from table where date not in (select min(date) from table);
Regards.
Anjan