hi dear coders
how can convert 20200605 to 2020_06_05 etc... ?
Sincerely
how can convert 20200605 to 2020_06_05 etc... ?
-
drjs5x
- Posts: 153
- Joined: 18 Nov 2015 18:12
- Location: Turkey
how can convert 20200605 to 2020_06_05 etc... ?
newbie or not...........
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: how can convert 20200605 to 2020_06_05 etc... ?
Code: Select all
$string = "20200605";
text regexreplace($string, "^(\d{4})(\d{2})(\d{2})$", "$1_$2_$3");
text substr($string, 0, 4) . "_" . substr($string, 4, 2) . "_" . substr($string, 6, 2);
One of my scripts helped you out? Please donate via Paypal
-
drjs5x
- Posts: 153
- Joined: 18 Nov 2015 18:12
- Location: Turkey
Re: how can convert 20200605 to 2020_06_05 etc... ?
thank you very much dear coder.

newbie or not...........
XYplorer Beta Club