Log log when analysis is completed
Execution time
Analysis commenced at Mon May 30 13:47:11 2022
Analysis completed at Mon May 30 13:48:43 2022
CPU time used 514.84 s
Elapsed wall clock time 92.00 s
equivalent to 0 hr, 1 min
-----------------------------------------------------
Out file
9999989 -> cmmesage.dat (MSCD)
2
1653886031 --> Analysis commenced at Mon May 30 13:47:11 2022
1653886123 --> Analysis completed at Mon May 30 13:48:43 2022
1
514.84375
302134
0
1
92
221056
0
2
0
1
------------------------------------------------------------------------
I would like to know how to display the corresponding value like Log.
Does anyone know how?
Solved! Go to Solution.
Solved by bernor_mf. Go to Solution.
Hi,
the integer value is referring to unix start time "1/1/1970"
The integer value could then be converted to date and time.
But will be in UTC.
Then convert UTC to Local.
Below example code.
Public Function UnixTimeToDate(ByVal Timestamp)
Const BaseDate = "1/1/1970"
UnixTimeToDate = DateAdd("s", Timestamp, BaseDate)
End Function
MsgBox UnixTimeToDate(1653886031),,"UnixTimeToDate"
varTime = UnixTimeToDate(1653886031)
Dim myObj, MyDate
MyDate = CDate( varTime )
Set myObj = CreateObject( "WbemScripting.SWbemDateTime" )
myObj.Year = Year( MyDate )
myObj.Month = Month( MyDate )
myObj.Day = Day( MyDate )
myObj.Hours = Hour( MyDate )
myObj.Minutes = Minute( myDate )
myObj.Seconds = Second( myDate )
ConvertUTCToLocal = myObj.GetVarDate( True )
MsgBox ConvertUTCToLocal,,"ConvertUTCToLocal"
For your integer, above code returns on my machine:
Try on your side to see result and format.
Have not researched how to convert to exactly the same format as in Analysis Log.
You could do some format changes to get it as wished, I think.
Add this to above code get a hint of what it could look like.
MsgBox MonthName(Month(varTime)) & " " & Day(varTime),,"MonthName"
MsgBox FormatDateTime(varTime,1) ,,"FormatDateTime 1"
Hope this helps.
Regards,
Berndt
Hi Lee,
thank you for the feedback.
Your are welcome.
Happy to hear this resolves your issue.😊
Regards,
Berndt
Can't find what you're looking for? Ask the community or share your knowledge.