=TODAY()
=NOW()
=DAY(B2)
Assuming you have a date (format mask irrelevant) in F5 you can do this to show the day number in another cell...
=WEEKDAY(F5)
By default, Sunday is day 1 and Saturday is day 7Note that formatting the cell with a ddd format mask, will convert the number to an abbreviated day name (Mon through to Sat)First Sunday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+7)
First Monday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+6)
First Tuesday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+5)
First Wednesday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+4)
First Thursday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+3)
First Friday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+2)
First Saturday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+1)
Second Sunday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+7)+7
Second Saturday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+1)+7
Third Sunday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+7)+14
Third Saturday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+1)+14
Fourth Sunday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+7)+21
Fourth Saturday
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+1)+21
Parameter driven
=$B$5-DAY($B$5)+8-WEEKDAY($B$5-DAY($B$5)+(8-P27))+((O27*7)-7)
Assuming you have a date (format mask irrelevant) in F5 you can do this to show a labelled week number in another cell...
="Week "&WEEKNUM(B2)
By default WEEKNUM assumes Sunday to be the first day of each week.The & joins the literal string to the function result.=ISOWEEKNUM(B2)
=MONTH(B2)
End of month containing date in B2...
=EOMONTH(B2,0)
End of month after month of date in B2
=EOMONTH(B2,1)
=YEAR(B2)
To calculate the number of working hours between two dates (assuming a 7.5 hour working day)...
=VALUE(NETWORKDAYS(F5,AZ5))*7.5
Assumes F5 holds the start date and AZ5 holds the end dateBy setting up a sheet to act as a holiday lookup table you can ensure national holidays are also ignored...
=NETWORKDAYS.INTL(EOMONTH($U$5,-1), EOMONTH($U$5,0), 1, 'UK Holidays'!$A$2:$A$9)
The "UK Holidays" lookup sheet has two columns: "Date" and "Holiday"EOMONTH returns the last day of the month... this example is working out working days between the end of previous month and the end of the month specified in cell $U$5To get working hours for the current month, use something like this...
=VALUE(NETWORKDAYS.INTL(EOMONTH($G$1,-1),EOMONTH($G$1,0),1,'UK Holidays'!$A$2:$A$9))*7.5
Where G1 contains the date of the first day of the month and a working day is assumed to be 7.5 hoursAdd one month to the date in B18...
=EDATE($B18,1)
Subtract one month from the date in B18...
=EDATE($B18,-1)
=DAYS(B2,DATE(2023, 01, 31))
TODO
=DAYS360(B2,DATE(2023, 01, 31),1)
=DATEDIF(B2,DATE(2023, 01, 31), "D")
=DATEDIF(B2,DATE(2023, 01, 31), "MD")
=DATEDIF(B2,DATE(2023, 01, 31), "YD")
=DATEDIF(B2,DATE(2024, 01, 31), "M")
Whole months only
=DATEDIF(B2,DATE(2024, 01, 31), "YM")
=WORKDAY(B2,10,'UK Holidays'!$A$2:$A$9)
=WORKDAY.INTL(B2,10,1,'UK Holidays'!$A$2:$A$9)
=YEARFRAC(B2, DATE(2023, 01, 31), 1)Â
Includes fractional years
=DATEDIF(B2,DATE(2024, 01, 31), "Y")
Whole years only
=DATEVALUE(B2)
=DATE(2023, 01, 31)