Forum Discussion
tristaanogre
13 years agoEsteemed Contributor
Try the following then:
aqDateTime.Time() only returns the time portion of the date. It's possible that, in older versions of TC, the DateTimeToFormatStr tries to evaluate the entire date for creating the formatted string regardless of what is in the string parameters. In TC 8.60 (the version I'm running) this does not seem to be the case. If you're running an older version of TC (such as TC 7), you should use the Now method to get the current date and time.
Function ActualHora
ActualHora = aqConvert.DateTimeToFormatStr(aqDateTime.Now(), "%H%M")
Log.Message(ActualHora)
End Function
aqDateTime.Time() only returns the time portion of the date. It's possible that, in older versions of TC, the DateTimeToFormatStr tries to evaluate the entire date for creating the formatted string regardless of what is in the string parameters. In TC 8.60 (the version I'm running) this does not seem to be the case. If you're running an older version of TC (such as TC 7), you should use the Now method to get the current date and time.
Related Content
Recent Discussions
- 24 hours agoMW_Didata