This function returns the current date and time as a formatted string.
object.DateTimeToFormattedString(aDate, aDateFormat,
aWithTimeZone, aTimeZoneFormat)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISDateTimeUtils interface |
|
aDate |
In, Required | DateTime |
The current date and time |
aDateFormat |
In, Required | string |
The format of 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 |
aTimeZoneFormat |
In, Required | string |
The format of the practice time zone |
string
Display the current date and time as a formatted string including the time offset for the practice time zone.
Dim aDateTimeUtils
Dim aDate
Dim aDateFormat
Dim aWithTimeZone
Dim aTimeZoneFormat
Dim aMessage
Set aDateTimeUtils = Profile.DateTimeUtils
aDate = aDateTimeUtils.Now
aDateFormat = "yyyy-mm-dd'T'hh:nn:ss"
aWithTimeZone = True
aTimeZoneFormat = "%s%s:%s"
aMessage = "Local Date and Time as Formatted String: " &_
aDateTimeUtils.DateTimeToFormattedString(aDate, aDateFormat, aWithTimeZone, aTimeZoneFormat)
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface DateTime as a formatted string cannot be found.
aTimeZoneFormat
added in
v8.5.0