mesg2anil
14 years agoRegular Contributor
Usage of Date and Time Log.SaveResultsAs
Hi...
I'm tying to use date and time stamp in the filename while saving it to a folder, the code is below. It is executing without any errors but it is not saving the file to the folder... Am I missing anything in the below code?
SaveResults()
I'm tying to use date and time stamp in the filename while saving it to a folder, the code is below. It is executing without any errors but it is not saving the file to the folder... Am I missing anything in the below code?
Sub SaveResults()
SaveResults()
Dim FileName
'Obtain the current date and time
NowValue = aqDateTime.Now ' using this line dint work so I converted date to string below
DatenTime = aqconvert.DateTimeToStr(NowValue) 'I thought it might work, this also dint work
'Write log file to folder
FileName = Project.ConfigPath &"\Log\Exported Log Report\Results" &DatenTime &".mht"
Log.SaveResultsAs Filename, 2
End Sub