# Now Method

Returns a Variant that represents the current system date and time in ISO format (yyyy-mm-ddThh:mm:ss).

expression.Now() As Variant

expression Required. An expression that returns a reference to a Date object.

returns A Variant that represents the current system date and time.

## Security Level

0: Can be accessed without restrictions.

## Remarks

Note This object model member is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Service Pack 1 or later is not installed. Any form that implements this object model member in its code will generate an error message if it is opened in InfoPath when service pack features are disabled or unavailable.

## Example

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

    var currentDateTime = XDocument.Util.Date.Now();

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp