0

I have this field data and need help to parse to a proper data format from a wince log file:

Import-Csv D:\svr\log_2021-0810_18-55-04_logcmd.txt -header Date,Ip,CMD,Command -Delimiter ':'  | foreach { 
  $_.Date + " " + $_.CMD      
}


Example Data:
599123178 10.10.10.2
599123468 10.10.10.2
599123846 10.10.10.2
599124189 10.10.10.2

I tried to use [DateTime]::Parse() but no avail.

Zippy
  • 455
  • 1
  • 11
  • 25
  • 1
    What kind of date string is that? I don't recognize it as a normal format. – TheMadTechnician Aug 10 '21 at 22:47
  • That is one of my issues. UNIX string will translate to 1988 or something but the date should be today. The log file is from a device that is running Server: Microsoft-WinCE/6.00 from source code with a date of 2011. But not sure what is writing to the logfile. – Zippy Aug 10 '21 at 22:49
  • 1
    I think it's safe to say that's most like X seconds since Y. The trouble is finding out exactly when Y is. I almost thought this was an Apple Core Data time stamp ([ref](https://stackoverflow.com/questions/55892524/timestamp-with-9-digits-in-sqlite-file)), but if those are supposed to be today then that's still not right. I'd find out exactly when one of those is and subtract that many seconds from then, and use that as a base. – TheMadTechnician Aug 10 '21 at 23:17

0 Answers0