次の方法で共有


Date.Now メソッド

現在のシステムの日付と時刻を ISO 形式 (YYYY-MM-DDThh:mm:ss) で取得します。

このメソッドは、CLS に準拠していません。  

名前空間: Microsoft.Office.Interop.InfoPath.SemiTrust
アセンブリ: Microsoft.Office.Interop.InfoPath.SemiTrust (microsoft.office.interop.infopath.semitrust.dll 内)

構文

'宣言
<DispIdAttribute(1)> _
Function Now As Object
'使用
Dim instance As Date
Dim returnValue As Object

returnValue = instance.Now
[DispIdAttribute(1)] 
Object Now ()

戻り値

現在の日付と時刻を表す object

コメント

メモ重要 :

このメンバは制限なしでアクセスできます。

次の例では、変数 currentDateTime に現在のシステムの日付と時刻を設定しています。

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

関連項目

参照

Date インターフェイス
Date のメンバ
Microsoft.Office.Interop.InfoPath.SemiTrust 名前空間