OPC Studio User's Guide and Reference
FormatTimestamp Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.PubSub Namespace > UAPubSubUtilities Class : FormatTimestamp Method
The timestamp to be formatted.
Formats the timestamp with precision sufficient for OPC UA PubSub.
Syntax
'Declaration
 
<NotNullAttribute()>
Public Shared Function FormatTimestamp( _
   ByVal dateTime As Date _
) As String
'Usage
 
Dim dateTime As Date
Dim value As String
 
value = UAPubSubUtilities.FormatTimestamp(dateTime)
[NotNull()]
public static string FormatTimestamp( 
   DateTime dateTime
)
[NotNull()]
public:
static String^ FormatTimestamp( 
   DateTime dateTime
) 

Parameters

dateTime
The timestamp to be formatted.

Return Value

Returns the formatted timestamp.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also