Data hosted with ♥ by
Pastebin.com
-
Download Raw
-
See Original
$dateTime
=
'2017-04-17 18:26:03'
;
$parts
=
$dateTime
.split
(
"/[- :]/"
)
;
$wanted
=
$parts
[
2
]
+
"/"
+
$parts
[
1
]
+
"/"
+
$parts
[
0
]
+
$parts
[
3
]
+
":"
+
$parts
[
4
]
##-- Regex --##
$result
=
$datetime
.replace
(
"/^(\d+)-(\d+)-(\d+)(.*):\d+$/"
,
'$3/$2/$1 $4'
)
;