説明
読取りでは、YEARS-MONTHSの書式を使用して
OraIntervalYM
の値を表す文字列を取得します。
設定では、Variant
型の文字列、数値またはOraIntervalYM
オブジェクトを使用できます。
備考
値セットがVariant
型の文字列の場合は、[+/-]YEARS-MONTHSの書式で記述する必要があります。
値セットが数値の場合、提供される値は、OraIntervalYM
オブジェクトが表す合計年数を表す必要があります。
例
Dim oraIYM as OraIntervalYM 'Create an OraIntervalYM using a string which represents 1 year and 6 months Set oraIYM = oo4oSession.CreateOraIntervalYM("1-6") 'get the OraIntervalYM.Value return a string for the Value property, ' iymStr is set to "01-06" iymStr = oraIYM.Value 'can also return a string for the Value property as follows iymStr = oraIYM 'set the OraIntervalDS.Value using a string which represents 1 year and 6 months oraIYM.Value = "1-6" 'set the OraIntervalYM.Value using a numeric value which represents '1 years and 6 months oraIYM.Value = 1.5