User:Syranzi/Documentation/How Tos/Calc: DAYS function

From Apache OpenOffice Wiki
Jump to: navigation, search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

DAYS

DAYS

Returns the number of days between two dates

2 つの日付の間にある日数を返します。

Syntax:

構文:

DAYS(enddate; startdate)

startdate and enddate may be dates as numbers or text (which is converted to number form).

DAYS(終了日付; 開始日付)

「開始日付」「終了日付」は、数字または (数字の形に変換された) 文字で表される日付です。
DAYS returns enddate - startdate. The result may be negative.
DAYS「終了日付 - 開始日付」の差の値を返します。結果が負数になることもあります。

Example:

例:

DAYS("2008-03-03"; "2008-03-01")

returns 2, the number of days between 1March08 and 3March08.

DAYS("2008-03-03"; "2008-03-01")

「2」を返します。08 年 3 月 1 日と 08 年 3 月 3 日の間にある日数です。

DAYS(A1; A2)

where cell A1 contains the date 2008-06-09 and A2 contains 2008-06-02 returns 7.
セル A1 が日付「2008-06-09」 、セル A2 が「2008-06-02」 であれば、「7」を返します。

Issues:

課題:

  • Note that DAYS does not count the first day of the period, but NETWORKDAYS does.
  • DAYS is not portable to Excel.
  • DAYS really does return enddate - startdate; thus if either date has a time component (for example "2008-01-03T15:15"), the number of days returned may not be integer. To ensure an integer result, consider INT(DAYS()).
  • DAYS は指定期間の初日を計上せず、NETWORKDAYS では計上することに注意してください。
  • DAYS は Excel に移植できません。
  • DAYS は必ず「終了日付 - 開始日付」の差の値を返します。そのどちらかの日付が時間コンポーネント (例 "2008-01-03T15:15") を持っていると、返される日数が整数でなくなる場合もあります。整数の結果を確実に導き出すには、INT(DAYS()) の使用を検討してください。



{{#switch:EN

| RU = Смотрите также: | UA = Дивіться також: | EN = See Also | PT = Ver também | #default = See Also }}
関連項目

Personal tools