in API C# i get all session and group by date and get first login .
Code: Select all
{
:local found ;
:local NotFound ;
:local first ;
:local Date "dec/28/2015" ;
:foreach session in=[/tool user-manager session find ] do={
:local name [/tool user-manager session get $session user];
:local fromTime [/tool user-manager session get $session from-time];
:if ( $fromTime ~ $Date ) do={
#:put $name;
:set $found ($found . "," . "\"" . $name ."\"");
} else={
:set $NotFound ($NotFound . "," . "\"" . $name ."\"");
#:put $name;
}
}
:set $found ("(".[:pick $found 1 ([:len $found])].")");
:set $NotFound ("(".[:pick $NotFound 1 ([:len $NotFound])].")");
#:put $found;
:local fon [:toarray ($found) ] ;
:for i from=1 to=([:len $fon]-2) do={
:put [:pick $fon $i];
}}