WiFI SSID Width current datetime
Posted: Thu Jun 01, 2023 8:41 pm
Hi to all,
I need to rename the wifi SSID with a partial date time, but I have some difficul with parse and variable:
:local date [/system clock get date];
:local months {"jan"="01";"feb"="02";"mar"="03";"apr"="04";"may"="05";"jun"="06";"jul"="07";"aug"="08";"sep"="09";"oct"=10;"nov"=11;"dec"=12};
:local day [:tonum [:pick $date 4 6]];:local year [:tonum [:pick $date 7 11]];:local month [:pick $date 0 3];:local mm (:$months->$month);
:local newdate "$year-$mm-$day";
/interface wireless set wlan1 ssid=“newwifi" + newdate
I need to rename the wifi SSID with a partial date time, but I have some difficul with parse and variable:
:local date [/system clock get date];
:local months {"jan"="01";"feb"="02";"mar"="03";"apr"="04";"may"="05";"jun"="06";"jul"="07";"aug"="08";"sep"="09";"oct"=10;"nov"=11;"dec"=12};
:local day [:tonum [:pick $date 4 6]];:local year [:tonum [:pick $date 7 11]];:local month [:pick $date 0 3];:local mm (:$months->$month);
:local newdate "$year-$mm-$day";
/interface wireless set wlan1 ssid=“newwifi" + newdate