Dates & Timestamps

Dates in the future & past

today + 3 weeks                     | 1 October
yesterday - 8 weeks 3 days          | 12 July

3 days from now                     | 13 September
3 days ago                          | 7 September

28 days before March 12             | 12 February
2 months 3 days after June 5        | 8 August

days since July 15                  | 57 days
days till December 25               | 106 days

Intervals of time between two dates

January 10 - February 5             | 3 weeks 5 days

3 March to 30 May                   | 2 months 3 weeks 6 days
days between 3 March and 30 May     | 88 days 

Monday - Friday                     | 4 days

Intervals of time are calculated from midday on the first date midday to midday on the last date in the interval. Use an inclusive interval function if you want to include both the starting and ending date in the interval (see below)

Inclusive intervals of time between two dates

Monday through Friday                | 5 days
April 1 through April 30 in days     | 30 days

Time in a month or quarter

days in Q3                         | 92 days
days in February 2020              | 29 days

Midpoint between two dates

midpoint between March 12 and April 5        | 24 March    
halfway between today and next Thursday      | 13 September

Week numbers (ISO 8601)

week of year                                   | 36
week number on march 12, 2021                  | 10    

Day of the week on a particular date

day of the week on January 24, 1984            | Tuesday
weekday on March 9, 2024                       | Saturday

Timestamps

Unix time is a system for describing a moment in time, often used in programming. A timestamp is the number of seconds that have passed since the "reference date" (January 1st, 1970).

April 1, 2019 to timestamp               | 1554109200
1559740303.48 to date                    | 5 June 2019 at 11:11 pm

To get a timestamp for the present moment, use current timestamp

current timestamp                         | 1559740303.48

ISO8601 Formatting

ISO8601 is an international standard for formatting dates & times, often used by databases.

April 1, 2019 3:30pm as iso8601               | 2019-04-01T15:30:00Z

Last updated