This function converts the current date and time to string.
object.DateTimeToAnsiString(aDate,
aWithTimeZone)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISDateTimeUtils interface |
|
aDate |
In, Required | DateTime |
The current date and time |
aWithTimeZone |
In, Required | bool |
If aWithTimeZone = True, the time offset of the time
zone will be appended to the function result |
string
Display the current date and time as string including the time offset for the practice time zone.
Dim aDateTimeUtils
Dim aDate
Dim aMessage
Set aDateTimeUtils = Profile.DateTimeUtils
aDate = aDateTimeUtils.Now
aMessage = "Local Date and Time: " & aDate & vbNewLine &_
"Local Date and Time as String: " & aDateTimeUtils.DateTimeToAnsiString(aDate, True)
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface the current date and time as string cannot be found.