input date and time
shortcut:
date: ctrl+; (semicolon)
time: ctrl+shift+: (colon)
函数:
today() 出现当前日期
now(), 出现当前日期和时间
**date()**已有年月日数据,用此函数combine
DATEDIF(start_date,end_date,unit) : Calculates the number of days, months, or years between two dates. This function is useful in formulas where you need to calculate an age.
NETWORKDAYS(start_date, end_date, [holidays])
NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays])
可定义周末是哪天,用于算一共工作多少天
WORKDAY(start_date, days, [holidays])
WORKDAY.INTL(start_date, days, [weekend], [holidays])
可定义周末是哪天,用于算项目结束日
WEEKDAY(serial_number,[return_type])
用于算星期几,需要设定 :format cells–custom–把type换成dddd,经常和IF()函数连用
DAY(serial_number), returns the day of a date
MONTH(serial_number), returns the month of a date
YEAR(serial_number), returns the year of the date
WEEKNUM(serial_number,[return_type])
用于算周数
RANDBETWEEN(bottom, top)
Returns a random integer number between the numbers you specify. 任意整数