Date.Now method

Gets the current system date and time in ISO format (YYYY-MM-DDThh:mm:ss).

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Function Now As Object
'Usage
Dim instance As Date
Dim returnValue As Object

returnValue = instance.Now()
Object Now()

Return value

Type: System.Object
An object that represents the current date and time.

Examples

In the following example, the variable currentDateTime is set to the current system date and time:

object currentDateTime = thisXDocument.Util.Date.Now();
thisXDocument.UI.Alert(currentDateTime.ToString());

See also

Reference

Date interface

Date members

Microsoft.Office.Interop.InfoPath namespace