Warning, /office/calligra/sheets/functions/datetime.xml is written in an unsupported language. File is not indexed.
0001 <!DOCTYPE KSpreadFunctions> 0002 <KSpreadFunctions> 0003 0004 <Group> 0005 <GroupName>Date & Time</GroupName> 0006 0007 <Function> 0008 <Name>WEEKDAY</Name> 0009 <Type>Int</Type> 0010 <Parameter> 0011 <Comment>Date</Comment> 0012 <Type>String</Type> 0013 </Parameter> 0014 <Parameter> 0015 <Comment>Method (optional)</Comment> 0016 <Type>Int</Type> 0017 </Parameter> 0018 <Help> 0019 <Text>The WEEKDAY() function returns the weekday of given date. If the method is 1 (default) WEEKDAY() returns 1 for sunday, 2 for monday,.. If the method is 2, monday is 1, tuesday 2, ... and if the method is 3 WEEKDAY() returns 0 for monday, 1 for tuesday,...</Text> 0020 <Syntax>WEEKDAY(date; method)</Syntax> 0021 <Example>WEEKDAY("2002-02-22"; 2) returns 5</Example> 0022 <Related>DAYNAME</Related> 0023 </Help> 0024 </Function> 0025 0026 <Function> 0027 <Name>DAYS360</Name> 0028 <Type>Int</Type> 0029 <Parameter> 0030 <Comment>Date1</Comment> 0031 <Type>String</Type> 0032 </Parameter> 0033 <Parameter> 0034 <Comment>Date2</Comment> 0035 <Type>String</Type> 0036 </Parameter> 0037 <Parameter> 0038 <Comment>Method</Comment> 0039 <Type>Boolean</Type> 0040 </Parameter> 0041 <Help> 0042 <Text>The DAYS360() function returns the number of days from date1 to date2 using a 360-day calendar in which all months are assumed to have 30 days. If method is false (default) the US method will be used, the European otherwise.</Text> 0043 <Syntax>DAYS360(date1; date2; method)</Syntax> 0044 <Example>DAYS360("2/22/2002"; "4/21/2002"; FALSE) returns 59</Example> 0045 <Related>DAYS</Related> 0046 <Related>MONTHS</Related> 0047 <Related>WEEKS</Related> 0048 <Related>YEARS</Related> 0049 </Help> 0050 </Function> 0051 0052 <Function> 0053 <Name>TIMEVALUE</Name> 0054 <Type>Float</Type> 0055 <Parameter> 0056 <Comment>Time</Comment> 0057 <Type>String</Type> 0058 </Parameter> 0059 <Help> 0060 <Text>The TIMEVALUE() function returns a number (between 0 and 1) representing the time of day.</Text> 0061 <Syntax>TIMEVALUE(time)</Syntax> 0062 <Example>TIMEVALUE("10:05:02") returns 0.42</Example> 0063 <Related>DATEVALUE</Related> 0064 </Help> 0065 </Function> 0066 0067 <Function> 0068 <Name>DATEVALUE</Name> 0069 <Type>Int</Type> 0070 <Parameter> 0071 <Comment>Date</Comment> 0072 <Type>String</Type> 0073 </Parameter> 0074 <Help> 0075 <Text>The DATEVALUE function returns a number representing the day, i.e the number of days elapsed since December 31, 1899.</Text> 0076 <Syntax>DATEVALUE(date)</Syntax> 0077 <Example>DATEVALUE("2/22/2002") returns 37309</Example> 0078 <Related>TIMEVALUE</Related> 0079 </Help> 0080 </Function> 0081 0082 <Function> 0083 <Name>EDATE</Name> 0084 <Type>Date</Type> 0085 <Parameter> 0086 <Comment>Date</Comment> 0087 <Type>String</Type> 0088 </Parameter> 0089 <Parameter> 0090 <Comment>Months</Comment> 0091 <Type>Int</Type> 0092 </Parameter> 0093 <Help> 0094 <Text>The EDATE functions returns the date that is specified by a given date and a number of months before or after that date.</Text> 0095 <Syntax>EDATE(date; months)</Syntax> 0096 <Example>EDATE("2/22/2002"; 3) returns "5/22/2002"</Example> 0097 <Example>EDATE("3/31/2002"; -1) returns "2/28/2002"</Example> 0098 <Related>DATE</Related> 0099 <Related>EOMONTH</Related> 0100 </Help> 0101 </Function> 0102 0103 <Function> 0104 <Name>EOMONTH</Name> 0105 <Type>Date</Type> 0106 <Parameter> 0107 <Comment>Date</Comment> 0108 <Type>String</Type> 0109 </Parameter> 0110 <Parameter> 0111 <Comment>Months</Comment> 0112 <Type>Int</Type> 0113 </Parameter> 0114 <Help> 0115 <Text>The EOMONTH functions returns the last day in the month specified by a date and the number of months from that date.</Text> 0116 <Syntax>EOMONTH(date; months)</Syntax> 0117 <Example>EOMONTH("2/22/2002"; 3) returns "5/31/2002"</Example> 0118 <Example>EOMONTH("3/12/2002"; -1) returns "2/28/2002"</Example> 0119 <Example>EOMONTH("3/12/2002"; 0) returns "3/31/2002"</Example> 0120 <Related>EDATE</Related> 0121 <Related>MONTH</Related> 0122 </Help> 0123 </Function> 0124 0125 <Function> 0126 <Name>YEAR</Name> 0127 <Type>Int</Type> 0128 <Parameter> 0129 <Comment>Date</Comment> 0130 <Type>String</Type> 0131 </Parameter> 0132 <Help> 0133 <Text>The YEAR functions returns the year of a date. If no parameter is specified the current year gets returned.</Text> 0134 <Syntax>YEAR(date)</Syntax> 0135 <Example>YEAR("2/22/2002") returns 2002</Example> 0136 <Example>YEAR(2323.1285) returns 1906</Example> 0137 <Related>DAY</Related> 0138 <Related>MONTH</Related> 0139 </Help> 0140 </Function> 0141 0142 <Function> 0143 <Name>MONTH</Name> 0144 <Type>Int</Type> 0145 <Parameter> 0146 <Comment>Date</Comment> 0147 <Type>String</Type> 0148 </Parameter> 0149 <Help> 0150 <Text>The MONTH functions returns the month of a date. If no parameter is specified the current month gets returned.</Text> 0151 <Syntax>MONTH(date)</Syntax> 0152 <Example>MONTH("2/22/2002") returns 2</Example> 0153 <Example>MONTH(2323.1285) returns 5</Example> 0154 <Related>DAY</Related> 0155 <Related>YEAR</Related> 0156 </Help> 0157 </Function> 0158 0159 <Function> 0160 <Name>DAY</Name> 0161 <Type>Int</Type> 0162 <Parameter> 0163 <Comment>Date</Comment> 0164 <Type>String</Type> 0165 </Parameter> 0166 <Help> 0167 <Text>The DAY functions returns the day of a date. If no parameter is specified the current day gets returned.</Text> 0168 <Syntax>DAY(date)</Syntax> 0169 <Example>DAY("2/22/2002") returns 22</Example> 0170 <Example>DAY(2323.1285) returns 11</Example> 0171 <Related>MONTH</Related> 0172 <Related>YEAR</Related> 0173 </Help> 0174 </Function> 0175 0176 <Function> 0177 <Name>HOUR</Name> 0178 <Type>Int</Type> 0179 <Parameter> 0180 <Comment>Time</Comment> 0181 <Type>String</Type> 0182 </Parameter> 0183 <Help> 0184 <Text>The HOUR functions returns the hour of a time. If no parameter is specified the current hour gets returned.</Text> 0185 <Syntax>HOUR(time)</Syntax> 0186 <Example>HOUR("22:10:12") returns 22</Example> 0187 <Example>HOUR(0.1285) returns 3</Example> 0188 <Related>MINUTE</Related> 0189 <Related>SECOND</Related> 0190 </Help> 0191 </Function> 0192 0193 <Function> 0194 <Name>MINUTE</Name> 0195 <Type>Int</Type> 0196 <Parameter> 0197 <Comment>Time</Comment> 0198 <Type>String</Type> 0199 </Parameter> 0200 <Help> 0201 <Text>The MINUTE functions returns the minutes of a time. If no parameter is specified the current minute is returned.</Text> 0202 <Syntax>MINUTE(time)</Syntax> 0203 <Example>MINUTE("22:10:12") returns 10</Example> 0204 <Example>MINUTE(0.1234) returns 57</Example> 0205 <Related>HOUR</Related> 0206 <Related>SECOND</Related> 0207 </Help> 0208 </Function> 0209 0210 <Function> 0211 <Name>SECOND</Name> 0212 <Type>Int</Type> 0213 <Parameter> 0214 <Comment>Time</Comment> 0215 <Type>String</Type> 0216 </Parameter> 0217 <Help> 0218 <Text>The SECOND functions returns the seconds of a time. If no parameter is specified the current second is returned.</Text> 0219 <Syntax>SECOND(time)</Syntax> 0220 <Example>SECOND("22:10:12") returns 12</Example> 0221 <Example>SECOND(0.1234) returns 42</Example> 0222 <Related>HOUR</Related> 0223 <Related>MINUTE</Related> 0224 </Help> 0225 </Function> 0226 0227 <Function> 0228 <Name>WEEKS</Name> 0229 <Type>Int</Type> 0230 <Parameter> 0231 <Comment>First (earlier) date value</Comment> 0232 <Type>String</Type> 0233 </Parameter> 0234 <Parameter> 0235 <Comment>Second date value</Comment> 0236 <Type>String</Type> 0237 </Parameter> 0238 <Parameter> 0239 <Comment>Calculation mode</Comment> 0240 <Type>Int</Type> 0241 </Parameter> 0242 <Help> 0243 <Text>The WEEKS() function returns the difference between two dates in weeks.The third parameter indicates the calculation mode: if the mode is 0, WEEKS() returns the maximal possible number of weeks between those days. If the mode is 1, it only returns the number of whole weeks in between.</Text> 0244 <Syntax>WEEKS(date2; date1; mode)</Syntax> 0245 <Example>WEEKS("2002-02-18"; "2002-02-26"; 0) returns 1, because there is one week and 1 day in between</Example> 0246 <Example>WEEKS("2002-19-02"; "2002-19-02"; 1) returns 0, because there is not a whole week in between, starting at the first day of the week (monday or sunday, depending on your local settings)</Example> 0247 </Help> 0248 </Function> 0249 0250 <Function> 0251 <Name>MONTHS</Name> 0252 <Type>Int</Type> 0253 <Parameter> 0254 <Comment>First (earlier) date value</Comment> 0255 <Type>String</Type> 0256 </Parameter> 0257 <Parameter> 0258 <Comment>Second date value</Comment> 0259 <Type>String</Type> 0260 </Parameter> 0261 <Parameter> 0262 <Comment>Calculation mode</Comment> 0263 <Type>Int</Type> 0264 </Parameter> 0265 <Help> 0266 <Text>The MONTHS() function returns the difference between two dates in months.The third parameter indicates the calculation mode: if the mode is 0, MONTHS() returns the maximal possible number of months between those days. If the mode is 1, it only returns the number of complete months in between.</Text> 0267 <Syntax>MONTHS(date2; date1; mode)</Syntax> 0268 <Example>MONTHS("2002-01-18"; "2002-02-26"; 0) returns 1, because there is 1 month and 8 days in between</Example> 0269 <Example>MONTHS("2002-01-19"; "2002-02-26"; 1) returns 0, because there is not a whole month in between, starting at the first day of the month</Example> 0270 </Help> 0271 </Function> 0272 0273 <Function> 0274 <Name>YEARS</Name> 0275 <Type>Int</Type> 0276 <Parameter> 0277 <Comment>First (earlier) date value</Comment> 0278 <Type>String</Type> 0279 </Parameter> 0280 <Parameter> 0281 <Comment>Second date value</Comment> 0282 <Type>String</Type> 0283 </Parameter> 0284 <Parameter> 0285 <Comment>Calculation mode</Comment> 0286 <Type>Int</Type> 0287 </Parameter> 0288 <Help> 0289 <Text>The YEARS() function returns the difference between two dates in years. The third parameter indicates the calculation mode: if the mode is 0, YEARS() returns the maximal possible number of years between those days. If the mode is 1, it only returns whole years, starting at the 1st Jan and ending on the 31st Dec.</Text> 0290 <Syntax>YEARS(date2; date1; mode)</Syntax> 0291 <Example>YEARS("2001-02-19"; "2002-02-26"; 0) returns 1, because there is one year and 7 days in between</Example> 0292 <Example>YEARS("2002-02-19"; "2002-02-26"; 1) returns 0, because there is not a whole year in between, starting at the first day of the year</Example> 0293 </Help> 0294 </Function> 0295 0296 <Function> 0297 <Name>DAYS</Name> 0298 <Type>Int</Type> 0299 <Parameter> 0300 <Comment>First (earlier) date value</Comment> 0301 <Type>String</Type> 0302 </Parameter> 0303 <Parameter> 0304 <Comment>Second date value</Comment> 0305 <Type>String</Type> 0306 </Parameter> 0307 <Help> 0308 <Text>The DAYS() function returns the difference between two dates in days.</Text> 0309 <Syntax>DAYS(date2; date1)</Syntax> 0310 <Example>DAYS("2002-02-22"; "2002-02-26") returns 4</Example> 0311 </Help> 0312 </Function> 0313 0314 <Function> 0315 <Name>DAYOFYEAR</Name> 0316 <Type>Int</Type> 0317 <Parameter> 0318 <Comment>Year</Comment> 0319 <Type>Int</Type> 0320 </Parameter> 0321 <Parameter> 0322 <Comment>Month</Comment> 0323 <Type>Int</Type> 0324 </Parameter> 0325 <Parameter> 0326 <Comment>Day</Comment> 0327 <Type>Int</Type> 0328 </Parameter> 0329 <Help> 0330 <Text>The DAYOFYEAR() function returns the number of the day in the year (1...365).</Text> 0331 <Syntax>DAYOFYEAR(year;month;date)</Syntax> 0332 <Example>DAYOFYEAR(2000;12;1) returns 336</Example> 0333 <Example>DAYOFYEAR(2000;2;29) returns 60</Example> 0334 </Help> 0335 </Function> 0336 0337 <Function> 0338 <Name>DATE</Name> 0339 <Type>String</Type> 0340 <Parameter> 0341 <Comment>Year</Comment> 0342 <Type>Int</Type> 0343 </Parameter> 0344 <Parameter> 0345 <Comment>Month</Comment> 0346 <Type>Int</Type> 0347 </Parameter> 0348 <Parameter> 0349 <Comment>Day</Comment> 0350 <Type>Int</Type> 0351 </Parameter> 0352 <Help> 0353 <Text>The DATE() function returns the date formatted with local parameters.</Text> 0354 <Syntax>DATE(year;month;date)</Syntax> 0355 <Example>DATE(2000;5;5) returns Friday 05 May 2000</Example> 0356 </Help> 0357 </Function> 0358 0359 <Function> 0360 <Name>TIME</Name> 0361 <Type>String</Type> 0362 <Parameter> 0363 <Comment>Hours</Comment> 0364 <Type>Int</Type> 0365 </Parameter> 0366 <Parameter> 0367 <Comment>Minutes</Comment> 0368 <Type>Int</Type> 0369 </Parameter> 0370 <Parameter> 0371 <Comment>Seconds</Comment> 0372 <Type>Int</Type> 0373 </Parameter> 0374 <Help> 0375 <Text>The TIME() function returns the time formatted with local parameters.</Text> 0376 <Syntax>TIME(hours;minutes;seconds)</Syntax> 0377 <Example>TIME(10;2;2) returns 10:02:02</Example> 0378 <Example>TIME(10;70;0) returns 11:10:0</Example> 0379 <Example>TIME(10;-40;0) returns 9:20:0</Example> 0380 </Help> 0381 </Function> 0382 0383 <Function> 0384 <Name>HOURS</Name> 0385 <Type>Int</Type> 0386 <Parameter> 0387 <Comment>Time</Comment> 0388 <Type>String</Type> 0389 </Parameter> 0390 <Help> 0391 <Text>The HOURS() function returns the value of the hours in a time expression.</Text> 0392 <Syntax>HOURS(time)</Syntax> 0393 <Example>HOURS("10:5:2") returns 10</Example> 0394 </Help> 0395 </Function> 0396 0397 <Function> 0398 <Name>ISLEAPYEAR</Name> 0399 <Type>Boolean</Type> 0400 <Parameter> 0401 <Comment>Year</Comment> 0402 <Type>Int</Type> 0403 </Parameter> 0404 <Help> 0405 <Text>The function ISLEAPYEAR() returns True if the given year is leap.</Text> 0406 <Syntax>ISLEAPYEAR(year)</Syntax> 0407 <Example>ISLEAPYEAR(2000) returns True</Example> 0408 </Help> 0409 </Function> 0410 0411 <Function> 0412 <Name>DAYSINMONTH</Name> 0413 <Type>Int</Type> 0414 <Parameter> 0415 <Comment>Year</Comment> 0416 <Type>Int</Type> 0417 </Parameter> 0418 <Parameter> 0419 <Comment>Month</Comment> 0420 <Type>Int</Type> 0421 </Parameter> 0422 <Help> 0423 <Text>The function DAYSINMONTH() returns the number of days in the given year and month.</Text> 0424 <Syntax>DAYSINMONTH(year;month)</Syntax> 0425 <Example>DAYSINMONTH(2000;2) returns 29</Example> 0426 </Help> 0427 </Function> 0428 0429 <Function> 0430 <Name>DAYSINYEAR</Name> 0431 <Type>Int</Type> 0432 <Parameter> 0433 <Comment>Year</Comment> 0434 <Type>Int</Type> 0435 </Parameter> 0436 <Help> 0437 <Text>The function DAYSINYEAR() returns the number of days in the given year.</Text> 0438 <Syntax>DAYSINYEAR(year)</Syntax> 0439 <Example>DAYSINYEAR(2000) returns 366</Example> 0440 </Help> 0441 </Function> 0442 0443 <Function> 0444 <Name>WEEKSINYEAR</Name> 0445 <Type>Int</Type> 0446 <Parameter> 0447 <Comment>Year</Comment> 0448 <Type>Int</Type> 0449 </Parameter> 0450 <Help> 0451 <Text>The function WEEKSINYEAR() returns the number of weeks in the given year.</Text> 0452 <Syntax>WEEKSINYEAR(year)</Syntax> 0453 <Example>WEEKSINYEAR(2000) returns 52</Example> 0454 </Help> 0455 </Function> 0456 0457 <Function> 0458 <Name>MINUTES</Name> 0459 <Type>Int</Type> 0460 <Parameter> 0461 <Comment>Time</Comment> 0462 <Type>String</Type> 0463 </Parameter> 0464 <Help> 0465 <Text>The MINUTES() function returns the value of the minutes in a time expression.</Text> 0466 <Syntax>MINUTES(time)</Syntax> 0467 <Example>MINUTES("10:5:2") returns 5</Example> 0468 </Help> 0469 </Function> 0470 0471 <Function> 0472 <Name>SECONDS</Name> 0473 <Type>Int</Type> 0474 <Parameter> 0475 <Comment>Time</Comment> 0476 <Type>String</Type> 0477 </Parameter> 0478 <Help> 0479 <Text>The SECONDS() function returns the value of the seconds in a time expression.</Text> 0480 <Syntax>SECONDS(time)</Syntax> 0481 <Example>SECONDS("10:5:2") returns 2</Example> 0482 </Help> 0483 </Function> 0484 0485 <Function> 0486 <Name>DAYNAME</Name> 0487 <Type>String</Type> 0488 <Parameter> 0489 <Comment>Number of day in week (1..7)</Comment> 0490 <Type>Int</Type> 0491 </Parameter> 0492 <Help> 0493 <Text>The DAYNAME() function returns the name of the day of the week (1..7). In some countries the first day of the week is Monday, while in others the first day of the week is Sunday.</Text> 0494 <Syntax>DAYNAME(weekday)</Syntax> 0495 <Example>DAYNAME(1) returns Monday (if the week starts on Monday)</Example> 0496 <Related>WEEKDAY</Related> 0497 </Help> 0498 </Function> 0499 0500 <Function> 0501 <Name>MONTHNAME</Name> 0502 <Type>String</Type> 0503 <Parameter> 0504 <Comment>Number of month (1..12)</Comment> 0505 <Type>Int</Type> 0506 </Parameter> 0507 <Help> 0508 <Text>The MONTHNAME() function returns the name of the month (1...12).</Text> 0509 <Syntax>MONTHNAME(number)</Syntax> 0510 <Example>MONTHNAME(5) returns May</Example> 0511 </Help> 0512 </Function> 0513 0514 <Function> 0515 <Name>CURRENTDATE</Name> 0516 <Type>Date</Type> 0517 <Help> 0518 <Text>The CURRENTDATE() function returns the current date. It is equivalent to the TODAY function.</Text> 0519 <Syntax>CURRENTDATE()</Syntax> 0520 <Example>CURRENTDATE() returns "Saturday 13 April 2002"</Example> 0521 <Related>CURRENTTIME</Related> 0522 <Related>TODAY</Related> 0523 </Help> 0524 </Function> 0525 0526 <Function> 0527 <Name>TODAY</Name> 0528 <Type>Date</Type> 0529 <Help> 0530 <Text>The TODAY() function returns the current date.</Text> 0531 <Syntax>TODAY()</Syntax> 0532 <Example>TODAY() returns "Saturday 13 April 2002"</Example> 0533 <Related>CURRENTTIME</Related> 0534 <Related>NOW</Related> 0535 </Help> 0536 </Function> 0537 0538 <Function> 0539 <Name>NOW</Name> 0540 <Type>Date</Type> 0541 <Help> 0542 <Text>The NOW() function returns the current date and time. It is identical with CURRENTDATETIME and provided for compatibility with other applications.</Text> 0543 <Syntax>NOW()</Syntax> 0544 <Example>NOW() returns "Saturday 13 April 2002 19:12:01"</Example> 0545 <Related>CURRENTTIME</Related> 0546 <Related>TODAY</Related> 0547 </Help> 0548 </Function> 0549 0550 <Function> 0551 <Name>CURRENTDATETIME</Name> 0552 <Type>Date</Type> 0553 <Help> 0554 <Text>The CURRENTDATETIME() function returns the current date and time.</Text> 0555 <Syntax>CURRENTDATETIME()</Syntax> 0556 <Example>CURRENTDATETIME() returns "Saturday 13 April 2002 19:12:01"</Example> 0557 </Help> 0558 </Function> 0559 0560 <Function> 0561 <Name>CURRENTTIME</Name> 0562 <Type>Date</Type> 0563 <Help> 0564 <Text>The CURRENTTIME() function returns the current time formatted with local parameters.</Text> 0565 <Syntax>CURRENTTIME()</Syntax> 0566 <Example>CURRENTTIME() returns "19:12:01"</Example> 0567 </Help> 0568 </Function> 0569 0570 <Function> 0571 <Name>EASTERSUNDAY</Name> 0572 <Type>Date</Type> 0573 <Parameter> 0574 <Comment>Year</Comment> 0575 <Type>Int</Type> 0576 </Parameter> 0577 <Help> 0578 <Text>The EASTERSUNDAY() function returns the date which corresponds to Easter Sunday in the year given as the parameter.</Text> 0579 <Syntax>EASTERSUNDAY(year)</Syntax> 0580 <Example>EASTERSUNDAY(2003) returns "20th April 2003"</Example> 0581 </Help> 0582 </Function> 0583 0584 <Function> 0585 <Name>ISOWEEKNUM</Name> 0586 <Type>Int</Type> 0587 <Parameter> 0588 <Comment>Date</Comment> 0589 <Type>String</Type> 0590 </Parameter> 0591 <Help> 0592 <Text>The ISOWEEKNUM() function returns number of the week which the date falls into. Note that this function is compliant with the ISO8601 standard: a week always begins on a Monday, and ends on a Sunday. The first week of a year is that week which contains the first Thursday of the year.</Text> 0593 <Syntax>ISOWEEKNUM(date)</Syntax> 0594 <Example>ISOWEEKNUM(A1) returns 51 when A1 is "21st of Dec".</Example> 0595 <Related>WEEKNUM</Related> 0596 </Help> 0597 </Function> 0598 0599 <Function> 0600 <Name>WEEKNUM</Name> 0601 <Type>Int</Type> 0602 <Parameter> 0603 <Comment>Date</Comment> 0604 <Type>String</Type> 0605 </Parameter> 0606 <Parameter> 0607 <Comment>Method (optional)</Comment> 0608 <Type>Int</Type> 0609 </Parameter> 0610 <Help> 0611 <Text>The WEEKNUM() function returns the non-ISO week number in which the date falls into.</Text> 0612 <Syntax>WEEKNUM(date; method)</Syntax> 0613 <Example>WEEKNUM(A1; 1) returns 11 when A1 is "9th of March 2008". Number of the week in the year, with a week beginning on Sunday (1, this is the default if Method is omitted.)</Example> 0614 <Example>WEEKNUM(A1; 2) returns 10 when A1 is "9th of March 2008". Number of the week in the year, with a week beginning on Monday (2)</Example> 0615 <Related>ISOWEEKNUM</Related> 0616 </Help> 0617 </Function> 0618 0619 <Function> 0620 <Name>DATEDIF</Name> 0621 <Type>Int</Type> 0622 <Parameter> 0623 <Comment>First date</Comment> 0624 <Type>String</Type> 0625 </Parameter> 0626 <Parameter> 0627 <Comment>Second date</Comment> 0628 <Type>String</Type> 0629 </Parameter> 0630 <Parameter> 0631 <Comment>interval</Comment> 0632 <Type>String</Type> 0633 </Parameter> 0634 <Help> 0635 <Text>The DATEDIF() function returns the difference between two dates.</Text> 0636 <Text>Interval must be one of the following: "m": month; "d": days; "y": complete years; "ym": month excluding years; "yd": days excluding years; "md": days excluding months and years</Text> 0637 <Syntax>DATEDIF(first date; second date; interval)</Syntax> 0638 <Example>DATEDIF(A1;A2;"d") A1 is "1st of January 1995" and A2 is "15th of June 1999" returns number of days 1626</Example> 0639 <Example>DATEDIF(A1;A2;"m") A1 is "1st of January 1995" and A2 is "15th of June 1999" returns number of months 53</Example> 0640 </Help> 0641 </Function> 0642 0643 <Function> 0644 <Name>YEARFRAC</Name> 0645 <Type>Int</Type> 0646 <Parameter> 0647 <Comment>First date</Comment> 0648 <Type>String</Type> 0649 </Parameter> 0650 <Parameter> 0651 <Comment>Second date</Comment> 0652 <Type>String</Type> 0653 </Parameter> 0654 <Parameter> 0655 <Comment>interval</Comment> 0656 <Type>String</Type> 0657 </Parameter> 0658 <Help> 0659 <Text>The YEARFRAC() function returns the number of full days between start date and end date according to the basis.</Text> 0660 <Text>Basis must be one of the following: 0 = 30/360 US, 1 = Actual/actual, 2 = Actual/360, 3 = Actual/365, 4 = European 30/360</Text> 0661 <Syntax>YEARFRAC(start date; end date; basis)</Syntax> 0662 </Help> 0663 </Function> 0664 0665 <Function> 0666 <Name>WORKDAY</Name> 0667 <Type>Date</Type> 0668 <Parameter> 0669 <Comment>Start date</Comment> 0670 <Type>String</Type> 0671 </Parameter> 0672 <Parameter> 0673 <Comment>Working days</Comment> 0674 <Type>Int</Type> 0675 </Parameter> 0676 <Parameter> 0677 <Comment>Holidays</Comment> 0678 <Type>String</Type> 0679 </Parameter> 0680 <Help> 0681 <Text>The WORKDAY() function returns the date which is working days from the start date.</Text> 0682 <Text>Holidays must be one of the following: number = days to add, a single date or an array of dates.</Text> 0683 <Syntax>WORKDAY(start date; days; holidays)</Syntax> 0684 <Example>if B9 is "01/01/2001", D3 is "01/03/2001", D4 is "01/04/2001" then WORKDAY(B9;2;D3:D4) returns "Fri Jan 5 2001"</Example> 0685 </Help> 0686 </Function> 0687 0688 <Function> 0689 <Name>NETWORKDAY</Name> 0690 <Type>Int</Type> 0691 <Parameter> 0692 <Comment>Start date</Comment> 0693 <Type>String</Type> 0694 </Parameter> 0695 <Parameter> 0696 <Comment>End date</Comment> 0697 <Type>String</Type> 0698 </Parameter> 0699 <Parameter> 0700 <Comment>Holidays</Comment> 0701 <Type>String</Type> 0702 </Parameter> 0703 <Help> 0704 <Text>The NETWORKDAY() function returns the number of working days between startdate and enddate.</Text> 0705 <Text>Holidays must be one of the following: number = days to add, a single date or an array of dates.</Text> 0706 <Syntax>NETWORKDAY(start date; end date; holidays)</Syntax> 0707 <Example>NETWORKDAY("01/01/2001";"01/08/2001") returns 5 workdays</Example> 0708 <Example>NETWORKDAY("01/01/2001";"01/08/2001";2) returns 3 workdays</Example> 0709 </Help> 0710 </Function> 0711 0712 <Function> 0713 <Name>DATE2UNIX</Name> 0714 <Type>Int</Type> 0715 <Parameter> 0716 <Comment>Date</Comment> 0717 <Type>String</Type> 0718 </Parameter> 0719 <Help> 0720 <Text>DATE2UNIX() function converts a date and time value to unix time.</Text> 0721 <Text>A unix time is the number of seconds after midnight January 1st, 1970.</Text> 0722 <Syntax>DATE2UNIX(date)</Syntax> 0723 <Example>DATE2UNIX("01/01/2000") returns 946,684,800</Example> 0724 </Help> 0725 </Function> 0726 0727 <Function> 0728 <Name>UNIX2DATE</Name> 0729 <Type>Date</Type> 0730 <Parameter> 0731 <Comment>Unixtime</Comment> 0732 <Type>Int</Type> 0733 </Parameter> 0734 <Help> 0735 <Text>UNIX2DATE() function converts unix time to a date and time value.</Text> 0736 <Text>A unix time is the number of seconds after midnight January 1st, 1970.</Text> 0737 <Syntax>UNIX2DATE(unixtime)</Syntax> 0738 <Example>UNIX2DATE(0) returns 1970-01-01</Example> 0739 </Help> 0740 </Function> 0741 0742 </Group> 0743 0744 </KSpreadFunctions>