ISDateTimeUtils.DateTimeToAnsiString

Description

This function converts the current date and time to string.

Syntax

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

Return Value

string

Returns the current date and time as string.

Example

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)   
Note:

In Profile Client v8 on User Interface the current date and time as string cannot be found.

Version information

Added in v7.9.0