Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Reference to a time interval of one day during a month and year. Not to be used for the 'social engagement' meaning.

A date is the representation of a time period, usually of 24 hour duration. This can be absolute (eg 30 December 1899 CE, which happens to be what Google spreadsheets interprets for Day 0) or relative, such as "yesterday" or "tomorrow".

Calculations involving dates are usually based on date serial numbers, with different systems indexing dates from different reference points (UNIX time, the 1900 system, the 1904 system, Hijrah etc) but in each case one unit represents one day and fractions thereof are usually allowed. Hence a quarter of a day (0.25 units) would be 6 hours so, for Google Spreadsheets for example, 1.25 might be formatted to display 31/12/1899 06:00:00).

Given for instance July 4 2000 being 7/4/2000 “US” and 4/7/2000 “UK”, questions about dates should, preferably, specify which convention is being applied or, alternatively, use examples such as 2/2/2000 where there is no difference.

Where dates may be involved in any type of calculation the question should specify the data is a string (text format) when not the representation of a date serial number, unless that is obvious from the context.

history | excerpt history