i have this in a log file, and i want only the time without (s) in a new log file or put in variable, thanks for your reponse.
Fri Nov 02 13:47:07 2018 time =5.803s
Fri Nov 02 14:02:10 2018 time =7.082s
My Code
Get-Content "logfile.txt" |
select-string -pattern "5" |
foreach-object{
write-Output $_ >> "C:\Users\titi\Desktop\test.txt"
}